summaryrefslogtreecommitdiff
path: root/silx
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2017-11-25 16:55:20 +0100
committerPicca Frédéric-Emmanuel <picca@debian.org>2017-11-25 16:55:20 +0100
commite19c96eff0c310c06c4f268c8b80cb33bd08996f (patch)
treef2b4a365ed899be04766f3937bcc2d58d22be065 /silx
parentbfa4dba15485b4192f8bbe13345e9658c97ecf76 (diff)
New upstream version 0.6.1+dfsg
Diffstat (limited to 'silx')
-rw-r--r--silx/gui/data/NXdataWidgets.py8
-rw-r--r--silx/gui/plot/ImageView.py17
-rw-r--r--silx/gui/plot/LegendSelector.py7
-rw-r--r--silx/gui/plot/PlotTools.py11
-rw-r--r--silx/gui/plot/PlotWidget.py130
-rw-r--r--silx/gui/plot/Profile.py9
-rw-r--r--silx/gui/plot/backends/BackendMatplotlib.py134
-rw-r--r--silx/gui/plot/items/axis.py2
-rw-r--r--silx/gui/plot/items/core.py7
-rw-r--r--silx/gui/plot/items/curve.py3
-rw-r--r--silx/gui/plot/test/__init__.py4
-rw-r--r--silx/gui/plot/test/testImageView.py136
-rw-r--r--silx/gui/plot/test/testPlotWidget.py21
-rw-r--r--silx/gui/plot3d/Plot3DWindow.py2
-rw-r--r--silx/gui/plot3d/SFViewParamTree.py28
-rw-r--r--silx/gui/plot3d/actions/__init__.py7
-rw-r--r--silx/gui/plot3d/actions/viewpoint.py98
-rw-r--r--silx/io/commonh5.py25
-rw-r--r--silx/io/fabioh5.py75
-rw-r--r--silx/io/test/test_fabioh5.py103
-rw-r--r--silx/math/combo.c22239
-rw-r--r--silx/math/combo.pyx21
-rw-r--r--silx/math/test/test_combo.py6
-rw-r--r--silx/resources/gui/icons/cube-rotate.pngbin0 -> 955 bytes
-rw-r--r--silx/resources/gui/icons/cube-rotate.svg12
25 files changed, 10467 insertions, 12638 deletions
diff --git a/silx/gui/data/NXdataWidgets.py b/silx/gui/data/NXdataWidgets.py
index b820380..7aaf3ad 100644
--- a/silx/gui/data/NXdataWidgets.py
+++ b/silx/gui/data/NXdataWidgets.py
@@ -116,7 +116,7 @@ class ArrayCurvePlot(qt.QWidget):
:param title: Graph title
"""
self.__signal = y
- self.__signal_name = ylabel
+ self.__signal_name = ylabel or "Y"
self.__signal_errors = yerror
self.__axis = x
self.__axis_name = xlabel
@@ -136,7 +136,7 @@ class ArrayCurvePlot(qt.QWidget):
self._plot.setGraphTitle(title or "")
self._plot.getXAxis().setLabel(self.__axis_name or "X")
- self._plot.getYAxis().setLabel(self.__signal_name or "Y")
+ self._plot.getYAxis().setLabel(self.__signal_name)
self._updateCurve()
if not self.__selector_is_connected:
@@ -175,8 +175,8 @@ class ArrayCurvePlot(qt.QWidget):
xerror=self.__axis_errors,
yerror=y_errors)
- # x monotonically increasing: curve
- elif numpy.all(numpy.diff(x) > 0):
+ # x monotonically increasing or decreasiing: curve
+ elif numpy.all(numpy.diff(x) > 0) or numpy.all(numpy.diff(x) < 0):
self._plot.addCurve(x, y, legend=legend,
xerror=self.__axis_errors,
yerror=y_errors)
diff --git a/silx/gui/plot/ImageView.py b/silx/gui/plot/ImageView.py
index 803a2fc..46e56e6 100644
--- a/silx/gui/plot/ImageView.py
+++ b/silx/gui/plot/ImageView.py
@@ -311,16 +311,13 @@ class ImageView(PlotWindow):
def _initWidgets(self, backend):
"""Set-up layout and plots."""
- # Monkey-patch for histogram size
- # alternative: create a layout that does not use widget size hints
- def sizeHint():
- return qt.QSize(self.HISTOGRAMS_HEIGHT, self.HISTOGRAMS_HEIGHT)
-
self._histoHPlot = PlotWidget(backend=backend)
+ self._histoHPlot.getWidgetHandle().setMinimumHeight(
+ self.HISTOGRAMS_HEIGHT)
+ self._histoHPlot.getWidgetHandle().setMaximumHeight(
+ self.HISTOGRAMS_HEIGHT)
self._histoHPlot.setInteractiveMode('zoom')
self._histoHPlot.sigPlotSignal.connect(self._histoHPlotCB)
- self._histoHPlot.getWidgetHandle().sizeHint = sizeHint
- self._histoHPlot.getWidgetHandle().minimumSizeHint = sizeHint
self.setPanWithArrowKeys(True)
@@ -330,10 +327,12 @@ class ImageView(PlotWindow):
self.sigActiveImageChanged.connect(self._activeImageChangedSlot)
self._histoVPlot = PlotWidget(backend=backend)
+ self._histoVPlot.getWidgetHandle().setMinimumWidth(
+ self.HISTOGRAMS_HEIGHT)
+ self._histoVPlot.getWidgetHandle().setMaximumWidth(
+ self.HISTOGRAMS_HEIGHT)
self._histoVPlot.setInteractiveMode('zoom')
self._histoVPlot.sigPlotSignal.connect(self._histoVPlotCB)
- self._histoVPlot.getWidgetHandle().sizeHint = sizeHint
- self._histoVPlot.getWidgetHandle().minimumSizeHint = sizeHint
self._radarView = RadarView()
self._radarView.visibleRectDragged.connect(self._radarViewCB)
diff --git a/silx/gui/plot/LegendSelector.py b/silx/gui/plot/LegendSelector.py
index 31bc3db..e9cfd1d 100644
--- a/silx/gui/plot/LegendSelector.py
+++ b/silx/gui/plot/LegendSelector.py
@@ -29,7 +29,7 @@ This widget is meant to work with :class:`PlotWindow`.
__authors__ = ["V.A. Sole", "T. Rueter", "T. Vincent"]
__license__ = "MIT"
-__data__ = "08/08/2016"
+__data__ = "16/10/2017"
import logging
@@ -971,9 +971,10 @@ class LegendsDockWidget(qt.QDockWidget):
def renameCurve(self, oldLegend, newLegend):
"""Change the name of a curve using remove and addCurve
- :param str oldLegend: The legend of the curve to be change
+ :param str oldLegend: The legend of the curve to be changed
:param str newLegend: The new legend of the curve
"""
+ is_active = self.plot.getActiveCurve(just_legend=True) == oldLegend
curve = self.plot.getCurve(oldLegend)
self.plot.remove(oldLegend, kind='curve')
self.plot.addCurve(curve.getXData(copy=False),
@@ -992,6 +993,8 @@ class LegendsDockWidget(qt.QDockWidget):
selectable=curve.isSelectable(),
fill=curve.isFill(),
resetzoom=False)
+ if is_active:
+ self.plot.setActiveCurve(newLegend)
def _legendSignalHandler(self, ddict):
"""Handles events from the LegendListView signal"""
diff --git a/silx/gui/plot/PlotTools.py b/silx/gui/plot/PlotTools.py
index 85dcc31..ed62d48 100644
--- a/silx/gui/plot/PlotTools.py
+++ b/silx/gui/plot/PlotTools.py
@@ -29,7 +29,7 @@ from __future__ import division
__authors__ = ["V.A. Sole", "T. Vincent"]
__license__ = "MIT"
-__date__ = "02/10/2017"
+__date__ = "16/10/2017"
import logging
@@ -151,13 +151,16 @@ class PositionInfo(qt.QWidget):
"""
if event['event'] == 'mouseMoved':
x, y = event['x'], event['y']
- self._updateStatusBar(x, y)
+ xPixel, yPixel = event['xpixel'], event['ypixel']
+ self._updateStatusBar(x, y, xPixel, yPixel)
- def _updateStatusBar(self, x, y):
+ def _updateStatusBar(self, x, y, xPixel, yPixel):
"""Update information from the status bar using the definitions.
:param float x: Position-x in data
:param float y: Position-y in data
+ :param float xPixel: Position-x in pixels
+ :param float yPixel: Position-y in pixels
"""
styleSheet = "color: rgb(0, 0, 0);" # Default style
@@ -180,8 +183,6 @@ class PositionInfo(qt.QWidget):
closestInPixels = self.plot.dataToPixel(
xClosest, yClosest, axis=activeCurve.getYAxis())
if closestInPixels is not None:
- xPixel, yPixel = event['xpixel'], event['ypixel']
-
if (abs(closestInPixels[0] - xPixel) < 5 and
abs(closestInPixels[1] - yPixel) < 5):
# Update label style sheet
diff --git a/silx/gui/plot/PlotWidget.py b/silx/gui/plot/PlotWidget.py
index 8fd5a5e..5bf2b59 100644
--- a/silx/gui/plot/PlotWidget.py
+++ b/silx/gui/plot/PlotWidget.py
@@ -175,7 +175,7 @@ from __future__ import division
__authors__ = ["V.A. Sole", "T. Vincent"]
__license__ = "MIT"
-__date__ = "30/08/2017"
+__date__ = "18/10/2017"
from collections import OrderedDict, namedtuple
@@ -612,8 +612,7 @@ class PlotWidget(qt.QMainWindow):
if (kind == 'curve' and not self.getAllCurves(just_legend=True,
withhidden=True)):
- self._colorIndex = 0
- self._styleIndex = 0
+ self._resetColorAndStyle()
self.notify('contentChanged', action='remove',
kind=kind, legend=legend)
@@ -780,6 +779,9 @@ class PlotWidget(qt.QMainWindow):
# Check if curve was previously active
wasActive = self.getActiveCurve(just_legend=True) == legend
+ if replace:
+ self._resetColorAndStyle()
+
# Create/Update curve object
curve = self.getCurve(legend)
mustBeAdded = curve is None
@@ -2319,7 +2321,7 @@ class PlotWidget(qt.QMainWindow):
flag = bool(flag)
self._backend.setKeepDataAspectRatio(flag=flag)
self._setDirtyPlot()
- self.resetZoom()
+ self._forceResetZoom()
self.notify('setKeepDataAspectRatio', state=flag)
def getGraphGrid(self):
@@ -2431,6 +2433,10 @@ class PlotWidget(qt.QMainWindow):
"""
return Colormap.getSupportedColormaps()
+ def _resetColorAndStyle(self):
+ self._colorIndex = 0
+ self._styleIndex = 0
+
def _getColorAndStyle(self):
color = self.colorList[self._colorIndex]
style = self._styleList[self._styleIndex]
@@ -2614,6 +2620,66 @@ class PlotWidget(qt.QMainWindow):
self._backend.replot()
self._dirty = False # reset dirty flag
+ def _forceResetZoom(self, dataMargins=None):
+ """Reset the plot limits to the bounds of the data and redraw the plot.
+
+ This method forces a reset zoom and does not check axis autoscale.
+
+ Extra margins can be added around the data inside the plot area
+ (see :meth:`setDataMargins`).
+ Margins are given as one ratio of the data range per limit of the
+ data (xMin, xMax, yMin and yMax limits).
+ For log scale, extra margins are applied in log10 of the data.
+
+ :param dataMargins: Ratios of margins to add around the data inside
+ the plot area for each side (default: no margins).
+ :type dataMargins: A 4-tuple of float as (xMin, xMax, yMin, yMax).
+ """
+ if dataMargins is None:
+ dataMargins = self._defaultDataMargins
+
+ # Get data range
+ ranges = self.getDataRange()
+ 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
+ else:
+ ymin2, ymax2 = ranges.yright
+
+ # Add margins around data inside the plot area
+ newLimits = list(_utils.addMarginsToLimits(
+ dataMargins,
+ self._xAxis._isLogarithmic(),
+ self._yAxis._isLogarithmic(),
+ xmin, xmax, ymin, ymax, ymin2, ymax2))
+
+ if self.isKeepDataAspectRatio():
+ # Use limits with margins to keep ratio
+ xmin, xmax, ymin, ymax = newLimits[:4]
+
+ # Compute bbox wth figure aspect ratio
+ plotWidth, plotHeight = self.getPlotBoundsInPixels()[2:]
+ plotRatio = plotHeight / plotWidth
+
+ if plotRatio > 0.:
+ dataRatio = (ymax - ymin) / (xmax - xmin)
+ if dataRatio < plotRatio:
+ # Increase y range
+ ycenter = 0.5 * (ymax + ymin)
+ yrange = (xmax - xmin) * plotRatio
+ newLimits[2] = ycenter - 0.5 * yrange
+ newLimits[3] = ycenter + 0.5 * yrange
+
+ elif dataRatio > plotRatio:
+ # Increase x range
+ xcenter = 0.5 * (xmax + xmin)
+ xrange_ = (ymax - ymin) / plotRatio
+ newLimits[0] = xcenter - 0.5 * xrange_
+ newLimits[1] = xcenter + 0.5 * xrange_
+
+ self.setLimits(*newLimits)
+
def resetZoom(self, dataMargins=None):
"""Reset the plot limits to the bounds of the data and redraw the plot.
@@ -2631,9 +2697,6 @@ class PlotWidget(qt.QMainWindow):
the plot area for each side (default: no margins).
:type dataMargins: A 4-tuple of float as (xMin, xMax, yMin, yMax).
"""
- if dataMargins is None:
- dataMargins = self._defaultDataMargins
-
xLimits = self._xAxis.getLimits()
yLimits = self._yAxis.getLimits()
y2Limits = self._yRightAxis.getLimits()
@@ -2641,52 +2704,19 @@ class PlotWidget(qt.QMainWindow):
xAuto = self._xAxis.isAutoScale()
yAuto = self._yAxis.isAutoScale()
+ # With log axes, autoscale if limits are <= 0
+ # This avoids issues with toggling log scale with matplotlib 2.1.0
+ if self._xAxis.getScale() == self._xAxis.LOGARITHMIC and xLimits[0] <= 0:
+ xAuto = True
+ if self._yAxis.getScale() == self._yAxis.LOGARITHMIC and (yLimits[0] <= 0 or y2Limits[0] <= 0):
+ yAuto = True
+
if not xAuto and not yAuto:
_logger.debug("Nothing to autoscale")
else: # Some axes to autoscale
+ self._forceResetZoom(dataMargins=dataMargins)
- # Get data range
- ranges = self.getDataRange()
- 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
- else:
- ymin2, ymax2 = ranges.yright
-
- # Add margins around data inside the plot area
- newLimits = list(_utils.addMarginsToLimits(
- dataMargins,
- self._xAxis._isLogarithmic(),
- self._yAxis._isLogarithmic(),
- xmin, xmax, ymin, ymax, ymin2, ymax2))
-
- if self.isKeepDataAspectRatio():
- # Use limits with margins to keep ratio
- xmin, xmax, ymin, ymax = newLimits[:4]
-
- # Compute bbox wth figure aspect ratio
- plotWidth, plotHeight = self.getPlotBoundsInPixels()[2:]
- plotRatio = plotHeight / plotWidth
-
- if plotRatio > 0.:
- dataRatio = (ymax - ymin) / (xmax - xmin)
- if dataRatio < plotRatio:
- # Increase y range
- ycenter = 0.5 * (ymax + ymin)
- yrange = (xmax - xmin) * plotRatio
- newLimits[2] = ycenter - 0.5 * yrange
- newLimits[3] = ycenter + 0.5 * yrange
-
- elif dataRatio > plotRatio:
- # Increase x range
- xcenter = 0.5 * (xmax + xmin)
- xrange_ = (ymax - ymin) / plotRatio
- newLimits[0] = xcenter - 0.5 * xrange_
- newLimits[1] = xcenter + 0.5 * xrange_
-
- self.setLimits(*newLimits)
-
+ # Restore limits for axis not in autoscale
if not xAuto and yAuto:
self.setGraphXLimits(*xLimits)
elif xAuto and not yAuto:
@@ -2696,8 +2726,6 @@ class PlotWidget(qt.QMainWindow):
if yLimits is not None:
self.setGraphYLimits(yLimits[0], yLimits[1], axis='left')
- self._setDirtyPlot()
-
if (xLimits != self._xAxis.getLimits() or
yLimits != self._yAxis.getLimits() or
y2Limits != self._yRightAxis.getLimits()):
diff --git a/silx/gui/plot/Profile.py b/silx/gui/plot/Profile.py
index ff85695..4a74fa7 100644
--- a/silx/gui/plot/Profile.py
+++ b/silx/gui/plot/Profile.py
@@ -31,6 +31,8 @@ __license__ = "MIT"
__date__ = "17/08/2017"
+import weakref
+
import numpy
from silx.image.bilinear import BilinearImage
@@ -348,7 +350,7 @@ class ProfileToolBar(qt.QToolBar):
title='Profile Selection'):
super(ProfileToolBar, self).__init__(title, parent)
assert plot is not None
- self.plot = plot
+ self._plotRef = weakref.ref(plot)
self._overlayColor = None
self._defaultOverlayColor = 'red' # update when active image change
@@ -443,6 +445,11 @@ class ProfileToolBar(qt.QToolBar):
self.getProfileMainWindow().sigClose.connect(self.clearProfile)
@property
+ def plot(self):
+ """The :class:`.PlotWidget` associated to the toolbar."""
+ return self._plotRef()
+
+ @property
@deprecated(since_version="0.6.0")
def browseAction(self):
return self._browseAction
diff --git a/silx/gui/plot/backends/BackendMatplotlib.py b/silx/gui/plot/backends/BackendMatplotlib.py
index 59e753e..b41f20e 100644
--- a/silx/gui/plot/backends/BackendMatplotlib.py
+++ b/silx/gui/plot/backends/BackendMatplotlib.py
@@ -28,7 +28,7 @@ from __future__ import division
__authors__ = ["V.A. Sole", "T. Vincent, H. Payno"]
__license__ = "MIT"
-__date__ = "16/08/2017"
+__date__ = "18/10/2017"
import logging
@@ -306,6 +306,14 @@ class BackendMatplotlib(BackendBase.BackendBase):
ystep = 1 if scale[1] >= 0. else -1
data = data[::ystep, ::xstep]
+ if matplotlib.__version__ < "2.1":
+ # matplotlib 1.4.2 do not support float128
+ dtype = data.dtype
+ if dtype.kind == "f" and dtype.itemsize >= 16:
+ _logger.warning("Your matplotlib version do not support "
+ "float128. Data converted to floa64.")
+ data = data.astype(numpy.float64)
+
image.set_data(data)
self.ax.add_artist(image)
@@ -602,16 +610,32 @@ class BackendMatplotlib(BackendBase.BackendBase):
# Graph axes
def setXAxisLogarithmic(self, flag):
- if matplotlib.__version__ >= "2.0.0":
- self.ax.cla()
- self.ax2.cla()
+ # Workaround for matplotlib 2.1.0 when one tries to set an axis
+ # to log scale with both limits <= 0
+ # In this case a draw with positive limits is needed first
+ if flag and matplotlib.__version__ >= '2.1.0':
+ xlim = self.ax.get_xlim()
+ if xlim[0] <= 0 and xlim[1] <= 0:
+ self.ax.set_xlim(1, 10)
+ self.draw()
+
self.ax2.set_xscale('log' if flag else 'linear')
self.ax.set_xscale('log' if flag else 'linear')
def setYAxisLogarithmic(self, flag):
- if matplotlib.__version__ >= "2.0.0":
- self.ax.cla()
- self.ax2.cla()
+ # Workaround for matplotlib 2.1.0 when one tries to set an axis
+ # to log scale with both limits <= 0
+ # In this case a draw with positive limits is needed first
+ if flag and matplotlib.__version__ >= '2.1.0':
+ redraw = False
+ for axis in (self.ax, self.ax2):
+ ylim = axis.get_ylim()
+ if ylim[0] <= 0 and ylim[1] <= 0:
+ axis.set_ylim(1, 10)
+ redraw = True
+ if redraw:
+ self.draw()
+
self.ax2.set_yscale('log' if flag else 'linear')
self.ax.set_yscale('log' if flag else 'linear')
@@ -700,12 +724,12 @@ class BackendMatplotlibQt(FigureCanvasQTAgg, BackendMatplotlib):
"""Signal handling automatic asynchronous replot"""
def __init__(self, plot, parent=None):
- self._insideResizeEventMethod = False
-
BackendMatplotlib.__init__(self, plot, parent)
FigureCanvasQTAgg.__init__(self, self.fig)
self.setParent(parent)
+ self._limitsBeforeResize = None
+
FigureCanvasQTAgg.setSizePolicy(
self, qt.QSizePolicy.Expanding, qt.QSizePolicy.Expanding)
FigureCanvasQTAgg.updateGeometry(self)
@@ -806,55 +830,83 @@ class BackendMatplotlibQt(FigureCanvasQTAgg, BackendMatplotlib):
# replot control
def resizeEvent(self, event):
- self._insideResizeEventMethod = True
- # Need to dirty the whole plot on resize.
- self._plot._setDirtyPlot()
+ # Store current limits
+ self._limitsBeforeResize = (
+ self.ax.get_xbound(), self.ax.get_ybound(), self.ax2.get_ybound())
+
FigureCanvasQTAgg.resizeEvent(self, event)
- self._insideResizeEventMethod = False
+ if self.isKeepDataAspectRatio() or self._overlays or self._graphCursor:
+ # This is needed with matplotlib 1.5.x and 2.0.x
+ self._plot._setDirtyPlot()
+
+ def _drawOverlays(self):
+ """Draw overlays if any."""
+ if self._overlays or self._graphCursor:
+ # There is some overlays or crosshair
+
+ # This assume that items are only on left/bottom Axes
+ for item in self._overlays:
+ self.ax.draw_artist(item)
+
+ for item in self._graphCursor:
+ self.ax.draw_artist(item)
def draw(self):
- """Override canvas draw method to support faster draw of overlays."""
- if self._plot._getDirtyPlot(): # Need a full redraw
- # Store previous limits
- xLimits = self.ax.get_xbound()
- yLimits = self.ax.get_ybound()
- yRightLimits = self.ax2.get_ybound()
+ """Overload draw
+ It performs a full redraw (including overlays) of the plot.
+ It also resets background and emit limits changed signal.
+
+ This is directly called by matplotlib for widget resize.
+ """
+ # Starting with mpl 2.1.0, toggling autoscale raises a ValueError
+ # in some situations. See #1081, #1136, #1163,
+ if matplotlib.__version__ >= "2.0.0":
+ try:
+ FigureCanvasQTAgg.draw(self)
+ except ValueError as err:
+ _logger.debug(
+ "ValueError caught while calling FigureCanvasQTAgg.draw: "
+ "'%s'", err)
+ else:
FigureCanvasQTAgg.draw(self)
- self._background = None # Any saved background is dirty
- # Check if limits changed due to a resize of the widget
+ if self._overlays or self._graphCursor:
+ # Save background
+ self._background = self.copy_from_bbox(self.fig.bbox)
+ else:
+ self._background = None # Reset background
+
+ # Check if limits changed due to a resize of the widget
+ if self._limitsBeforeResize is not None:
+ xLimits, yLimits, yRightLimits = self._limitsBeforeResize
+ self._limitsBeforeResize = None
+
if xLimits != self.ax.get_xbound():
self._plot.getXAxis()._emitLimitsChanged()
if yLimits != self.ax.get_ybound():
self._plot.getYAxis(axis='left')._emitLimitsChanged()
if yRightLimits != self.ax2.get_ybound():
- self._plot.getYAxis(axis='left')._emitLimitsChanged()
-
- if (self._overlays or self._graphCursor or
- self._plot._getDirtyPlot() == 'overlay'):
- # There are overlays or crosshair, or they is just no more overlays
+ self._plot.getYAxis(axis='right')._emitLimitsChanged()
- # Specific case: called from resizeEvent:
- # avoid store/restore background, just draw the overlay
- if not self._insideResizeEventMethod:
- if self._background is None: # First store the background
- self._background = self.copy_from_bbox(self.fig.bbox)
+ self._drawOverlays()
- self.restore_region(self._background)
-
- # This assume that items are only on left/bottom Axes
- for item in self._overlays:
- self.ax.draw_artist(item)
+ def replot(self):
+ BackendMatplotlib.replot(self)
- for item in self._graphCursor:
- self.ax.draw_artist(item)
+ dirtyFlag = self._plot._getDirtyPlot()
+ if dirtyFlag == 'overlay':
+ # Only redraw overlays using fast rendering path
+ if self._background is None:
+ self._background = self.copy_from_bbox(self.fig.bbox)
+ self.restore_region(self._background)
+ self._drawOverlays()
self.blit(self.fig.bbox)
- def replot(self):
- BackendMatplotlib.replot(self)
- self.draw()
+ elif dirtyFlag: # Need full redraw
+ self.draw()
+
# cursor
diff --git a/silx/gui/plot/items/axis.py b/silx/gui/plot/items/axis.py
index 56fd762..ff36512 100644
--- a/silx/gui/plot/items/axis.py
+++ b/silx/gui/plot/items/axis.py
@@ -220,7 +220,7 @@ class Axis(qt.QObject):
for item in self._plot._getItems(withhidden=True):
item._updated()
self._plot._invalidateDataRange()
- self._plot.resetZoom()
+ self._plot._forceResetZoom()
self.sigScaleChanged.emit(self._scale)
if emitLog:
diff --git a/silx/gui/plot/items/core.py b/silx/gui/plot/items/core.py
index 0f4ffb9..34ac700 100644
--- a/silx/gui/plot/items/core.py
+++ b/silx/gui/plot/items/core.py
@@ -543,7 +543,7 @@ class ColorMixIn(object):
def getColor(self):
"""Returns the RGBA color of the item
- :rtype: 4-tuple of float in [0, 1]
+ :rtype: 4-tuple of float in [0, 1] or array of colors
"""
return self._color
@@ -566,9 +566,8 @@ class ColorMixIn(object):
else: # Array of colors
assert color.ndim == 2
- if self._color != color:
- self._color = color
- self._updated(ItemChangedType.COLOR)
+ self._color = color
+ self._updated(ItemChangedType.COLOR)
class YAxisMixIn(object):
diff --git a/silx/gui/plot/items/curve.py b/silx/gui/plot/items/curve.py
index ce7f03e..0ba475d 100644
--- a/silx/gui/plot/items/curve.py
+++ b/silx/gui/plot/items/curve.py
@@ -31,6 +31,7 @@ __date__ = "06/03/2017"
import logging
+import numpy
from .. import Colors
from .core import (Points, LabelsMixIn, ColorMixIn, YAxisMixIn,
@@ -75,7 +76,7 @@ class Curve(Points, ColorMixIn, YAxisMixIn, FillMixIn, LabelsMixIn, LineMixIn):
xFiltered, yFiltered, xerror, yerror = self.getData(
copy=False, displayed=True)
- if len(xFiltered) == 0:
+ if len(xFiltered) == 0 or not numpy.any(numpy.isfinite(xFiltered)):
return None # No data to display, do not add renderer to backend
return backend.addCurve(xFiltered, yFiltered, self.getLegend(),
diff --git a/silx/gui/plot/test/__init__.py b/silx/gui/plot/test/__init__.py
index 2c2943e..07338b6 100644
--- a/silx/gui/plot/test/__init__.py
+++ b/silx/gui/plot/test/__init__.py
@@ -51,6 +51,7 @@ from . import testItem
from . import testUtilsAxis
from . import testLimitConstraints
from . import testComplexImageView
+from . import testImageView
def suite():
@@ -77,5 +78,6 @@ def suite():
testItem.suite(),
testUtilsAxis.suite(),
testLimitConstraints.suite(),
- testComplexImageView.suite()])
+ testComplexImageView.suite(),
+ testImageView.suite()])
return test_suite
diff --git a/silx/gui/plot/test/testImageView.py b/silx/gui/plot/test/testImageView.py
new file mode 100644
index 0000000..641d438
--- /dev/null
+++ b/silx/gui/plot/test/testImageView.py
@@ -0,0 +1,136 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2017 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.
+#
+# ###########################################################################*/
+"""Basic tests for PlotWindow"""
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "22/09/2017"
+
+
+import unittest
+import numpy
+
+from silx.gui import qt
+from silx.gui.test.utils import TestCaseQt
+
+from silx.gui.plot import ImageView
+from silx.gui.plot.Colormap import Colormap
+
+
+class TestImageView(TestCaseQt):
+ """Tests of ImageView widget."""
+
+ def setUp(self):
+ super(TestImageView, self).setUp()
+ self.plot = ImageView()
+ self.plot.show()
+ self.qWaitForWindowExposed(self.plot)
+
+ def tearDown(self):
+ self.qapp.processEvents()
+ self.plot.setAttribute(qt.Qt.WA_DeleteOnClose)
+ self.plot.close()
+ del self.plot
+ self.qapp.processEvents()
+ super(TestImageView, self).tearDown()
+
+ def testSetImage(self):
+ """Test setImage"""
+ image = numpy.arange(100).reshape(10, 10)
+
+ self.plot.setImage(image, reset=True)
+ self.qWait(100)
+ self.assertEqual(self.plot.getXAxis().getLimits(), (0, 10))
+ self.assertEqual(self.plot.getYAxis().getLimits(), (0, 10))
+
+ # With reset=False
+ self.plot.setImage(image[::2, ::2], reset=False)
+ self.qWait(100)
+ self.assertEqual(self.plot.getXAxis().getLimits(), (0, 10))
+ self.assertEqual(self.plot.getYAxis().getLimits(), (0, 10))
+
+ self.plot.setImage(image, origin=(10, 20), scale=(2, 4), reset=False)
+ self.qWait(100)
+ self.assertEqual(self.plot.getXAxis().getLimits(), (0, 10))
+ self.assertEqual(self.plot.getYAxis().getLimits(), (0, 10))
+
+ # With reset=True
+ self.plot.setImage(image, origin=(1, 2), scale=(1, 0.5), reset=True)
+ self.qWait(100)
+ self.assertEqual(self.plot.getXAxis().getLimits(), (1, 11))
+ self.assertEqual(self.plot.getYAxis().getLimits(), (2, 7))
+
+ self.plot.setImage(image[::2, ::2], reset=True)
+ self.qWait(100)
+ self.assertEqual(self.plot.getXAxis().getLimits(), (0, 5))
+ self.assertEqual(self.plot.getYAxis().getLimits(), (0, 5))
+
+ def testColormap(self):
+ """Test get|setColormap"""
+ image = numpy.arange(100).reshape(10, 10)
+ self.plot.setImage(image)
+
+ # Colormap as dict
+ self.plot.setColormap({'name': 'viridis',
+ 'normalization': 'log',
+ 'autoscale': False,
+ 'vmin': 0,
+ 'vmax': 1})
+ colormap = self.plot.getColormap()
+ self.assertEqual(colormap.getName(), 'viridis')
+ self.assertEqual(colormap.getNormalization(), 'log')
+ self.assertEqual(colormap.getVMin(), 0)
+ self.assertEqual(colormap.getVMax(), 1)
+
+ # Colormap as keyword arguments
+ self.plot.setColormap(colormap='magma',
+ normalization='linear',
+ autoscale=True,
+ vmin=1,
+ vmax=2)
+ self.assertEqual(colormap.getName(), 'magma')
+ self.assertEqual(colormap.getNormalization(), 'linear')
+ self.assertEqual(colormap.getVMin(), None)
+ self.assertEqual(colormap.getVMax(), None)
+
+ # Update colormap with keyword argument
+ self.plot.setColormap(normalization='log')
+ self.assertEqual(colormap.getNormalization(), 'log')
+
+ # Colormap as Colormap object
+ cmap = Colormap()
+ self.plot.setColormap(cmap)
+ self.assertIs(self.plot.getColormap(), cmap)
+
+
+def suite():
+ test_suite = unittest.TestSuite()
+ test_suite.addTest(
+ unittest.defaultTestLoader.loadTestsFromTestCase(TestImageView))
+ return test_suite
+
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='suite')
diff --git a/silx/gui/plot/test/testPlotWidget.py b/silx/gui/plot/test/testPlotWidget.py
index deeb198..ccee428 100644
--- a/silx/gui/plot/test/testPlotWidget.py
+++ b/silx/gui/plot/test/testPlotWidget.py
@@ -371,6 +371,27 @@ class TestPlotCurve(PlotWidgetTestCase):
color=color, linestyle="-", symbol='o')
self.plot.resetZoom()
+ # Test updating color array
+
+ # From array to array
+ newColors = numpy.ones((len(self.xData), 3), dtype=numpy.float32)
+ self.plot.addCurve(self.xData, self.yData,
+ legend="curve 2",
+ replace=False, resetzoom=False,
+ color=newColors, symbol='o')
+
+ # Array to single color
+ self.plot.addCurve(self.xData, self.yData,
+ legend="curve 2",
+ replace=False, resetzoom=False,
+ color='green', symbol='o')
+
+ # single color to array
+ self.plot.addCurve(self.xData, self.yData,
+ legend="curve 2",
+ replace=False, resetzoom=False,
+ color=color, symbol='o')
+
class TestPlotMarker(PlotWidgetTestCase):
"""Basic tests for add*Marker"""
diff --git a/silx/gui/plot3d/Plot3DWindow.py b/silx/gui/plot3d/Plot3DWindow.py
index 1bc2738..d8c393e 100644
--- a/silx/gui/plot3d/Plot3DWindow.py
+++ b/silx/gui/plot3d/Plot3DWindow.py
@@ -35,6 +35,7 @@ __date__ = "26/01/2017"
from silx.gui import qt
from .Plot3DWidget import Plot3DWidget
+from .actions.viewpoint import RotateViewport
from .tools import OutputToolBar, InteractiveModeToolBar
from .tools import ViewpointToolButton
@@ -58,6 +59,7 @@ class Plot3DWindow(qt.QMainWindow):
toolbar = qt.QToolBar(self)
toolbar.addWidget(ViewpointToolButton(plot3D=self._plot3D))
+ toolbar.addAction(RotateViewport(parent=toolbar, plot3d=self._plot3D))
self.addToolBar(toolbar)
toolbar = OutputToolBar(parent=self)
diff --git a/silx/gui/plot3d/SFViewParamTree.py b/silx/gui/plot3d/SFViewParamTree.py
index 8b144df..e67c17e 100644
--- a/silx/gui/plot3d/SFViewParamTree.py
+++ b/silx/gui/plot3d/SFViewParamTree.py
@@ -304,7 +304,10 @@ class ColorItem(SubjectItem):
def getEditor(self, parent, option, index):
editor = QColorEditor(parent)
editor.color = self.getColor()
- editor.sigColorChanged.connect(self._editorSlot)
+
+ # Wrapping call in lambda is a workaround for PySide with Python 3
+ editor.sigColorChanged.connect(
+ lambda color: self._editorSlot(color))
return editor
def _editorSlot(self, color):
@@ -645,7 +648,9 @@ class IsoSurfaceColorItem(SubjectItem):
color = self.subject.getColor()
color.setAlpha(255)
editor.color = color
- editor.sigColorChanged.connect(self.__editorChanged)
+ # Wrapping call in lambda is a workaround for PySide with Python 3
+ editor.sigColorChanged.connect(
+ lambda color: self.__editorChanged(color))
return editor
def __editorChanged(self, color):
@@ -740,7 +745,9 @@ class IsoSurfaceAlphaItem(SubjectItem):
color = self.subject.getColor()
editor.setValue(color.alpha())
- editor.valueChanged.connect(self.__editorChanged)
+ # Wrapping call in lambda is a workaround for PySide with Python 3
+ editor.valueChanged.connect(
+ lambda value: self.__editorChanged(value))
return editor
@@ -1007,7 +1014,10 @@ class PlaneOrientationItem(SubjectItem):
editor = qt.QComboBox(parent)
for iconName, text, tooltip, normal in self._PLANE_ACTIONS:
editor.addItem(getQIcon(iconName), text)
- editor.currentIndexChanged[int].connect(self.__editorChanged)
+
+ # Wrapping call in lambda is a workaround for PySide with Python 3
+ editor.currentIndexChanged[int].connect(
+ lambda index: self.__editorChanged(index))
return editor
def __editorChanged(self, index):
@@ -1074,7 +1084,10 @@ class PlaneColormapItem(ColormapBase):
def getEditor(self, parent, option, index):
editor = qt.QComboBox(parent)
editor.addItems(self.listValues)
- editor.currentIndexChanged[int].connect(self.__editorChanged)
+
+ # Wrapping call in lambda is a workaround for PySide with Python 3
+ editor.currentIndexChanged[int].connect(
+ lambda index: self.__editorChanged(index))
return editor
@@ -1154,7 +1167,10 @@ class NormalizationNode(ColormapBase):
def getEditor(self, parent, option, index):
editor = qt.QComboBox(parent)
editor.addItems(self.listValues)
- editor.currentIndexChanged[int].connect(self.__editorChanged)
+
+ # Wrapping call in lambda is a workaround for PySide with Python 3
+ editor.currentIndexChanged[int].connect(
+ lambda index: self.__editorChanged(index))
return editor
diff --git a/silx/gui/plot3d/actions/__init__.py b/silx/gui/plot3d/actions/__init__.py
index ebc57d2..26243cf 100644
--- a/silx/gui/plot3d/actions/__init__.py
+++ b/silx/gui/plot3d/actions/__init__.py
@@ -28,6 +28,7 @@ __authors__ = ["T. Vincent"]
__license__ = "MIT"
__date__ = "06/09/2017"
-from .Plot3DAction import Plot3DAction
-from . import io
-from . import mode
+from .Plot3DAction import Plot3DAction # noqa
+from . import viewpoint # noqa
+from . import io # noqa
+from . import mode # noqa
diff --git a/silx/gui/plot3d/actions/viewpoint.py b/silx/gui/plot3d/actions/viewpoint.py
new file mode 100644
index 0000000..6aa7400
--- /dev/null
+++ b/silx/gui/plot3d/actions/viewpoint.py
@@ -0,0 +1,98 @@
+# coding: utf-8
+# /*##########################################################################
+#
+# Copyright (c) 2017 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 Plot3DAction controlling the viewpoint.
+
+It provides QAction to rotate or pan a Plot3DWidget.
+"""
+
+from __future__ import absolute_import, division
+
+__authors__ = ["T. Vincent"]
+__license__ = "MIT"
+__date__ = "03/10/2017"
+
+
+import time
+import logging
+
+from silx.gui import qt
+from silx.gui.icons import getQIcon
+from .Plot3DAction import Plot3DAction
+
+
+_logger = logging.getLogger(__name__)
+
+
+class RotateViewport(Plot3DAction):
+ """QAction to rotate the scene of a Plot3DWidget
+
+ :param parent: See :class:`QAction`
+ :param Plot3DWidget plot3d: Plot3DWidget the action is associated with
+ """
+
+ _TIMEOUT_MS = 50
+ """Time interval between to frames (in milliseconds)"""
+
+ _DEGREE_PER_SECONDS = 360. / 5.
+ """Rotation speed of the animation"""
+
+ def __init__(self, parent, plot3d=None):
+ super(RotateViewport, self).__init__(parent, plot3d)
+
+ self._previousTime = None
+
+ self._timer = qt.QTimer(self)
+ self._timer.setInterval(self._TIMEOUT_MS) # 20fps
+ self._timer.timeout.connect(self._rotate)
+
+ self.setIcon(getQIcon('cube-rotate'))
+ self.setText('Rotate scene')
+ self.setToolTip('Rotate the 3D scene around the vertical axis')
+ self.setCheckable(True)
+ self.triggered[bool].connect(self._triggered)
+
+
+ def _triggered(self, checked=False):
+ plot3d = self.getPlot3DWidget()
+ if plot3d is None:
+ _logger.error(
+ 'Cannot start/stop rotation, no associated Plot3DWidget')
+ elif checked:
+ self._previousTime = time.time()
+ self._timer.start()
+ else:
+ self._timer.stop()
+ self._previousTime = None
+
+ def _rotate(self):
+ """Perform a step of the rotation"""
+ if self._previousTime is None:
+ _logger.error('Previous time not set!')
+ angleStep = 0.
+ else:
+ angleStep = self._DEGREE_PER_SECONDS * (time.time() - self._previousTime)
+
+ self.getPlot3DWidget().viewport.orbitCamera('left', angleStep)
+ self._previousTime = time.time()
diff --git a/silx/io/commonh5.py b/silx/io/commonh5.py
index 0f5ac02..02c4181 100644
--- a/silx/io/commonh5.py
+++ b/silx/io/commonh5.py
@@ -37,7 +37,7 @@ from .utils import is_dataset
__authors__ = ["V. Valls", "P. Knobel"]
__license__ = "MIT"
-__date__ = "21/09/2017"
+__date__ = "02/10/2017"
class _MappingProxyType(collections.MutableMapping):
@@ -190,14 +190,29 @@ class Dataset(Node):
def _check_data(self, data):
"""Check that the data provided by the dataset is valid.
- :param numpy.ndarray data: Data associated to the dataset
+ It is valid when it can be stored in a HDF5 using h5py.
+ :param numpy.ndarray data: Data associated to the dataset
:raises TypeError: In the case the data is not valid.
"""
+ if isinstance(data, (six.text_type, six.binary_type)):
+ return
+
chartype = data.dtype.char
- if chartype in ["U", "O"]:
- msg = "Type of the dataset '%s' is not supported. Found '%s'."
- raise TypeError(msg % (self.name, data.dtype))
+ if chartype == "U":
+ pass
+ elif chartype == "O":
+ d = h5py.special_dtype(vlen=data.dtype)
+ if d is not None:
+ return
+ d = h5py.special_dtype(ref=data.dtype)
+ if d is not None:
+ return
+ else:
+ return
+
+ msg = "Type of the dataset '%s' is not supported. Found '%s'."
+ raise TypeError(msg % (self.name, data.dtype))
def _set_data(self, data):
"""Set the data exposed by the dataset.
diff --git a/silx/io/fabioh5.py b/silx/io/fabioh5.py
index 3dfba96..2cee032 100644
--- a/silx/io/fabioh5.py
+++ b/silx/io/fabioh5.py
@@ -44,6 +44,12 @@ from . import commonh5
from silx.third_party import six
from silx import version as silx_version
+try:
+ import h5py
+except ImportError as e:
+ h5py = None
+
+
_logger = logging.getLogger(__name__)
@@ -71,6 +77,7 @@ class RawHeaderData(commonh5.LazyLoadableDataset):
"""Initialize hold data by merging all headers of each frames.
"""
headers = []
+ types = set([])
for frame in range(self.__fabio_file.nframes):
if self.__fabio_file.nframes == 1:
header = self.__fabio_file.header
@@ -81,10 +88,33 @@ class RawHeaderData(commonh5.LazyLoadableDataset):
for key, value in header.items():
data.append("%s: %s" % (str(key), str(value)))
- headers.append(u"\n".join(data).encode("utf-8"))
+ data = "\n".join(data)
+ try:
+ line = data.encode("ascii")
+ types.add(numpy.string_)
+ except UnicodeEncodeError:
+ try:
+ line = data.encode("utf-8")
+ types.add(numpy.unicode_)
+ except UnicodeEncodeError:
+ # Fallback in void
+ line = numpy.void(data)
+ types.add(numpy.void)
+
+ headers.append(line)
+
+ if numpy.void in types:
+ dtype = numpy.void
+ elif numpy.unicode_ in types:
+ dtype = numpy.unicode_
+ else:
+ dtype = numpy.string_
+
+ if dtype == numpy.unicode_ and h5py is not None:
+ # h5py only support vlen unicode
+ dtype = h5py.special_dtype(vlen=six.text_type)
- # create the header list
- return numpy.array(headers, dtype=numpy.string_)
+ return numpy.array(headers, dtype=dtype)
class MetadataGroup(commonh5.LazyLoadableGroup):
@@ -214,6 +244,7 @@ class FabioReader(object):
self.__counters = {}
self.__positioners = {}
self.__measurements = {}
+ self.__key_filters = set([])
self.__data = None
self.__frame_count = self.__fabio_file.nframes
self._read(self.__fabio_file)
@@ -323,6 +354,13 @@ class FabioReader(object):
def _read(self, fabio_file):
"""Read all metadata from the fabio file and store it into this
object."""
+
+ self.__key_filters.clear()
+ if hasattr(fabio_file, "RESERVED_HEADER_KEYS"):
+ # Provided in fabio 0.5
+ for key in fabio_file.RESERVED_HEADER_KEYS:
+ self.__key_filters.add(key.lower())
+
for frame in range(fabio_file.nframes):
if fabio_file.nframes == 1:
header = fabio_file.header
@@ -330,10 +368,22 @@ class FabioReader(object):
header = fabio_file.getframe(frame).header
self._read_frame(frame, header)
+ def _is_filtered_key(self, key):
+ """
+ If this function returns True, the :meth:`_read_key` while not be
+ called with this `key`while reading the metatdata frame.
+
+ :param str key: A key of the metadata
+ :rtype: bool
+ """
+ return key.lower() in self.__key_filters
+
def _read_frame(self, frame_id, header):
"""Read all metadata from a frame and store it into this
object."""
for key, value in header.items():
+ if self._is_filtered_key(key):
+ continue
self._read_key(frame_id, key, value)
def _read_key(self, frame_id, name, value):
@@ -372,8 +422,10 @@ class FabioReader(object):
if has_none:
# Fix missing data according to the array type
- if result_type.kind in ["S", "U"]:
- none_value = ""
+ if result_type.kind == "S":
+ none_value = b""
+ elif result_type.kind == "U":
+ none_value = u""
elif result_type.kind == "f":
none_value = numpy.float("NaN")
elif result_type.kind == "i":
@@ -472,10 +524,10 @@ class FabioReader(object):
result_type = numpy.result_type(*types)
- if issubclass(result_type.type, numpy.string_):
+ if issubclass(result_type.type, (numpy.string_, six.binary_type)):
# use the raw data to create the result
return numpy.string_(value)
- elif issubclass(result_type.type, numpy.unicode_):
+ elif issubclass(result_type.type, (numpy.unicode_, six.text_type)):
# use the raw data to create the result
return numpy.unicode_(value)
else:
@@ -526,11 +578,10 @@ class EdfFabioReader(FabioReader):
self._read_mnemonic_key(frame_id, "counter", header)
FabioReader._read_frame(self, frame_id, header)
- def _read_key(self, frame_id, name, value):
- """Overwrite the method to filter counter or motor keys."""
- if name in self.__catch_keys:
- return
- FabioReader._read_key(self, frame_id, name, value)
+ def _is_filtered_key(self, key):
+ if key in self.__catch_keys:
+ return True
+ return FabioReader._is_filtered_key(self, key)
def _get_mnemonic_key(self, base_key, header):
mnemonic_values_key = base_key + "_mne"
diff --git a/silx/io/test/test_fabioh5.py b/silx/io/test/test_fabioh5.py
index 0237620..d9459ae 100644
--- a/silx/io/test/test_fabioh5.py
+++ b/silx/io/test/test_fabioh5.py
@@ -25,11 +25,15 @@
__authors__ = ["V. Valls"]
__license__ = "MIT"
-__date__ = "29/08/2017"
+__date__ = "04/10/2017"
+import os
+import sys
import logging
import numpy
import unittest
+import tempfile
+import shutil
_logger = logging.getLogger(__name__)
@@ -309,11 +313,104 @@ class TestFabioH5(unittest.TestCase):
self.assertIs(data1._get_data(), data2._get_data())
self.assertEqual(self.h5_image.get(data2.name, getlink=True).path, data1.name)
+ def test_dirty_header(self):
+ """Test that it does not fail"""
+ try:
+ header = {}
+ header["foo"] = b'abc'
+ data = numpy.array([[0, 0], [0, 0]], dtype=numpy.int8)
+ fabio_image = fabio.edfimage.edfimage(data=data, header=header)
+ header = {}
+ header["foo"] = b'a\x90bc\xFE'
+ fabio_image.appendFrame(data=data, header=header)
+ except Exception as e:
+ _logger.error(e.args[0])
+ _logger.debug("Backtrace", exc_info=True)
+ self.skipTest("fabio do not allow to create the resource")
+
+ h5_image = fabioh5.File(fabio_image=fabio_image)
+ scan_header_path = "/scan_0/instrument/file/scan_header"
+ self.assertIn(scan_header_path, h5_image)
+ data = h5_image[scan_header_path]
+ self.assertIsInstance(data[...], numpy.ndarray)
+
+ def test_unicode_header(self):
+ """Test that it does not fail"""
+ try:
+ header = {}
+ header["foo"] = b'abc'
+ data = numpy.array([[0, 0], [0, 0]], dtype=numpy.int8)
+ fabio_image = fabio.edfimage.edfimage(data=data, header=header)
+ header = {}
+ header["foo"] = u'abc\u2764'
+ fabio_image.appendFrame(data=data, header=header)
+ except Exception as e:
+ _logger.error(e.args[0])
+ _logger.debug("Backtrace", exc_info=True)
+ self.skipTest("fabio do not allow to create the resource")
+
+ h5_image = fabioh5.File(fabio_image=fabio_image)
+ scan_header_path = "/scan_0/instrument/file/scan_header"
+ self.assertIn(scan_header_path, h5_image)
+ data = h5_image[scan_header_path]
+ self.assertIsInstance(data[...], numpy.ndarray)
+
+
+class TestFabioH5WithEdf(unittest.TestCase):
+
+ @classmethod
+ def setUpClass(cls):
+ if fabio is None:
+ raise unittest.SkipTest("fabio is needed")
+ if h5py is None:
+ raise unittest.SkipTest("h5py is needed")
+
+ cls.tmp_directory = tempfile.mkdtemp()
+
+ cls.edf_filename = os.path.join(cls.tmp_directory, "test.edf")
+
+ header = {
+ "integer": "-100",
+ "float": "1.0",
+ "string": "hi!",
+ "list_integer": "100 50 0",
+ "list_float": "1.0 2.0 3.5",
+ "string_looks_like_list": "2000 hi!",
+ }
+ data = numpy.array([[10, 11], [12, 13], [14, 15]], dtype=numpy.int64)
+ fabio_image = fabio.edfimage.edfimage(data, header)
+ fabio_image.write(cls.edf_filename)
+
+ cls.fabio_image = fabio.open(cls.edf_filename)
+ cls.h5_image = fabioh5.File(fabio_image=cls.fabio_image)
+
+ @classmethod
+ def tearDownClass(cls):
+ cls.fabio_image = None
+ cls.h5_image = None
+ if sys.platform == "win32" and fabio is not None:
+ # gc collect is needed to close a file descriptor
+ # opened by fabio and not released.
+ # https://github.com/silx-kit/fabio/issues/167
+ import gc
+ gc.collect()
+ shutil.rmtree(cls.tmp_directory)
+
+ def test_reserved_format_metadata(self):
+ if fabio.hexversion < 327920: # 0.5.0 final
+ self.skipTest("fabio >= 0.5.0 final is needed")
+
+ # The EDF contains reserved keys in the header
+ self.assertIn("HeaderID", self.fabio_image.header)
+ # We do not expose them in FabioH5
+ self.assertNotIn("/scan_0/instrument/detector_0/others/HeaderID", self.h5_image)
+
def suite():
+ loadTests = unittest.defaultTestLoader.loadTestsFromTestCase
test_suite = unittest.TestSuite()
- test_suite.addTest(
- unittest.defaultTestLoader.loadTestsFromTestCase(TestFabioH5))
+ test_suite.addTest(loadTests(TestFabioH5))
+ test_suite.addTest(loadTests(TestFabioH5WithEdf))
return test_suite
diff --git a/silx/math/combo.c b/silx/math/combo.c
index 7f0654d..1b4967e 100644
--- a/silx/math/combo.c
+++ b/silx/math/combo.c
@@ -1,31 +1,28 @@
-/* Generated by Cython 0.25.2 */
-
-/* BEGIN: Cython Metadata
-{
- "distutils": {
- "depends": [
- "silx/math/include/isnan.h"
- ],
- "include_dirs": [
- "silx/math/include"
- ],
- "language": "c"
- },
- "module_name": "silx.math.combo"
-}
-END: Cython Metadata */
+/* Generated by Cython 0.21.1 */
#define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
#error Cython requires Python 2.6+ or Python 3.2+.
#else
-#define CYTHON_ABI "0_25_2"
+#define CYTHON_ABI "0_21_1"
#include <stddef.h>
#ifndef offsetof
- #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
#ifndef __stdcall
@@ -44,11 +41,6 @@ END: Cython Metadata */
#ifndef DL_EXPORT
#define DL_EXPORT(t) t
#endif
-#ifndef HAVE_LONG_LONG
- #if PY_VERSION_HEX >= 0x03030000 || (PY_MAJOR_VERSION == 2 && PY_VERSION_HEX >= 0x02070000)
- #define HAVE_LONG_LONG
- #endif
-#endif
#ifndef PY_LONG_LONG
#define PY_LONG_LONG LONG_LONG
#endif
@@ -56,214 +48,63 @@ END: Cython Metadata */
#define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
- #define CYTHON_COMPILING_IN_PYPY 1
- #define CYTHON_COMPILING_IN_PYSTON 0
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #undef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 0
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #undef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 0
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #undef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 1
- #undef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 0
- #undef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 0
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
-#elif defined(PYSTON_VERSION)
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_PYSTON 1
- #define CYTHON_COMPILING_IN_CPYTHON 0
- #ifndef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #endif
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #undef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 0
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 1
- #endif
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
- #undef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 0
- #undef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 0
+#define CYTHON_COMPILING_IN_PYPY 1
+#define CYTHON_COMPILING_IN_CPYTHON 0
#else
- #define CYTHON_COMPILING_IN_PYPY 0
- #define CYTHON_COMPILING_IN_PYSTON 0
- #define CYTHON_COMPILING_IN_CPYTHON 1
- #ifndef CYTHON_USE_TYPE_SLOTS
- #define CYTHON_USE_TYPE_SLOTS 1
- #endif
- #if PY_MAJOR_VERSION < 3
- #undef CYTHON_USE_ASYNC_SLOTS
- #define CYTHON_USE_ASYNC_SLOTS 0
- #elif !defined(CYTHON_USE_ASYNC_SLOTS)
- #define CYTHON_USE_ASYNC_SLOTS 1
- #endif
- #if PY_VERSION_HEX < 0x02070000
- #undef CYTHON_USE_PYLONG_INTERNALS
- #define CYTHON_USE_PYLONG_INTERNALS 0
- #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
- #define CYTHON_USE_PYLONG_INTERNALS 1
- #endif
- #ifndef CYTHON_USE_PYLIST_INTERNALS
- #define CYTHON_USE_PYLIST_INTERNALS 1
- #endif
- #ifndef CYTHON_USE_UNICODE_INTERNALS
- #define CYTHON_USE_UNICODE_INTERNALS 1
- #endif
- #if PY_VERSION_HEX < 0x030300F0
- #undef CYTHON_USE_UNICODE_WRITER
- #define CYTHON_USE_UNICODE_WRITER 0
- #elif !defined(CYTHON_USE_UNICODE_WRITER)
- #define CYTHON_USE_UNICODE_WRITER 1
- #endif
- #ifndef CYTHON_AVOID_BORROWED_REFS
- #define CYTHON_AVOID_BORROWED_REFS 0
- #endif
- #ifndef CYTHON_ASSUME_SAFE_MACROS
- #define CYTHON_ASSUME_SAFE_MACROS 1
- #endif
- #ifndef CYTHON_UNPACK_METHODS
- #define CYTHON_UNPACK_METHODS 1
- #endif
- #ifndef CYTHON_FAST_THREAD_STATE
- #define CYTHON_FAST_THREAD_STATE 1
- #endif
- #ifndef CYTHON_FAST_PYCALL
- #define CYTHON_FAST_PYCALL 1
- #endif
+#define CYTHON_COMPILING_IN_PYPY 0
+#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
-#if !defined(CYTHON_FAST_PYCCALL)
-#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
-#endif
-#if CYTHON_USE_PYLONG_INTERNALS
- #include "longintrepr.h"
- #undef SHIFT
- #undef BASE
- #undef MASK
-#endif
-#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
- #define Py_OptimizeFlag 0
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600
+#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
#define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyClass_Type
#else
#define __Pyx_BUILTIN_MODULE_NAME "builtins"
- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \
PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#define __Pyx_DefaultClassType PyType_Type
#endif
-#ifndef Py_TPFLAGS_CHECKTYPES
+#if PY_MAJOR_VERSION >= 3
#define Py_TPFLAGS_CHECKTYPES 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_INDEX
#define Py_TPFLAGS_HAVE_INDEX 0
-#endif
-#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
-#ifndef Py_TPFLAGS_HAVE_FINALIZE
+#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE)
#define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
-#ifndef METH_FASTCALL
- #define METH_FASTCALL 0x80
- typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args,
- Py_ssize_t nargs, PyObject *kwnames);
-#else
- #define __Pyx_PyCFunctionFast _PyCFunctionFast
-#endif
-#if CYTHON_FAST_PYCCALL
-#define __Pyx_PyFastCFunction_Check(func)\
- ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
-#else
-#define __Pyx_PyFastCFunction_Check(func) 0
-#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
#define CYTHON_PEP393_ENABLED 1
- #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \
0 : _PyUnicode_Ready((PyObject *)(op)))
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
#define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
#define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
#define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
- #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#else
#define CYTHON_PEP393_ENABLED 0
- #define PyUnicode_1BYTE_KIND 1
- #define PyUnicode_2BYTE_KIND 2
- #define PyUnicode_4BYTE_KIND 4
#define __Pyx_PyUnicode_READY(op) (0)
#define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
#define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
- #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
#define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
#define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
#define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
- #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
- #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
#define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyFrozenSet_Size(s) PyObject_Size(s)
#else
#define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
- #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \
PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
- #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
- #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
- #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
-#endif
-#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
- #define PyObject_Malloc(s) PyMem_Malloc(s)
- #define PyObject_Free(p) PyMem_Free(p)
- #define PyObject_Realloc(p) PyMem_Realloc(p)
-#endif
-#if CYTHON_COMPILING_IN_PYSTON
- #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
-#else
- #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
- #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+ #define __Pyx_PyFrozenSet_Size(s) PySet_Size(s)
#endif
#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
@@ -272,9 +113,6 @@ END: Cython Metadata */
#else
#define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
#endif
-#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
- #define PyObject_ASCII(o) PyObject_Repr(o)
-#endif
#if PY_MAJOR_VERSION >= 3
#define PyBaseString_Type PyUnicode_Type
#define PyStringObject PyUnicodeObject
@@ -293,7 +131,6 @@ END: Cython Metadata */
#define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
#endif
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
-#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#if PY_MAJOR_VERSION >= 3
#define PyIntObject PyLongObject
#define PyInt_Type PyLong_Type
@@ -332,20 +169,16 @@ END: Cython Metadata */
#else
#define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
-#if CYTHON_USE_ASYNC_SLOTS
- #if PY_VERSION_HEX >= 0x030500B1
- #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
- #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+#ifndef CYTHON_INLINE
+ #if defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
#else
- typedef struct {
- unaryfunc am_await;
- unaryfunc am_aiter;
- unaryfunc am_anext;
- } __Pyx_PyAsyncMethodsStruct;
- #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #define CYTHON_INLINE
#endif
-#else
- #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
#if defined(__GNUC__)
@@ -358,74 +191,26 @@ END: Cython Metadata */
#define CYTHON_RESTRICT
#endif
#endif
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-# define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-# define CYTHON_UNUSED
-# endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-# define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-# define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_MAYBE_UNUSED_VAR
-# if defined(__cplusplus)
- template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
-# else
-# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-# define CYTHON_NCP_UNUSED
-# else
-# define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
-#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
-
-#ifndef CYTHON_INLINE
- #if defined(__clang__)
- #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
- #elif defined(__GNUC__)
- #define CYTHON_INLINE __inline__
- #elif defined(_MSC_VER)
- #define CYTHON_INLINE __inline
- #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define CYTHON_INLINE inline
- #else
- #define CYTHON_INLINE
- #endif
-#endif
-
-#if defined(WIN32) || defined(MS_WINDOWS)
- #define _USE_MATH_DEFINES
-#endif
-#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
+ /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+ a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+ a quiet NaN. */
float value;
memset(&value, 0xFF, sizeof(value));
return value;
}
#endif
-#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
-#define __Pyx_truncl trunc
-#else
-#define __Pyx_truncl truncl
+#ifdef __cplusplus
+template<typename T>
+void __Pyx_call_destructor(T* x) {
+ x->~T();
+}
#endif
-#define __PYX_ERR(f_index, lineno, Ln_error) \
-{ \
- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
-}
-
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
#define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
@@ -442,14 +227,18 @@ static CYTHON_INLINE float __PYX_NAN() {
#endif
#endif
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
#define __PYX_HAVE__silx__math__combo
#define __PYX_HAVE_API__silx__math__combo
-#include <float.h>
+#include "float.h"
#include "isnan.h"
#include "pythread.h"
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
+#include "string.h"
+#include "stdlib.h"
+#include "stdio.h"
#include "pystate.h"
#ifdef _OPENMP
#include <omp.h>
@@ -459,7 +248,20 @@ static CYTHON_INLINE float __PYX_NAN() {
#define CYTHON_WITHOUT_ASSERTIONS
#endif
-typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
@@ -467,34 +269,16 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
-#define __Pyx_uchar_cast(c) ((unsigned char)c)
-#define __Pyx_long_cast(x) ((long)x)
-#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
- (sizeof(type) < sizeof(Py_ssize_t)) ||\
- (sizeof(type) > sizeof(Py_ssize_t) &&\
- likely(v < (type)PY_SSIZE_T_MAX ||\
- v == (type)PY_SSIZE_T_MAX) &&\
- (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
- v == (type)PY_SSIZE_T_MIN))) ||\
- (sizeof(type) == sizeof(Py_ssize_t) &&\
- (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \
+ (sizeof(type) < sizeof(Py_ssize_t)) || \
+ (sizeof(type) > sizeof(Py_ssize_t) && \
+ likely(v < (type)PY_SSIZE_T_MAX || \
+ v == (type)PY_SSIZE_T_MAX) && \
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \
+ v == (type)PY_SSIZE_T_MIN))) || \
+ (sizeof(type) == sizeof(Py_ssize_t) && \
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \
v == (type)PY_SSIZE_T_MAX))) )
-#if defined (__cplusplus) && __cplusplus >= 201103L
- #include <cstdlib>
- #define __Pyx_sst_abs(value) std::abs(value)
-#elif SIZEOF_INT >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) abs(value)
-#elif SIZEOF_LONG >= SIZEOF_SIZE_T
- #define __Pyx_sst_abs(value) labs(value)
-#elif defined (_MSC_VER) && defined (_M_X64)
- #define __Pyx_sst_abs(value) _abs64(value)
-#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
- #define __Pyx_sst_abs(value) llabs(value)
-#elif defined (__GNUC__)
- #define __Pyx_sst_abs(value) __builtin_llabs(value)
-#else
- #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
-#endif
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
@@ -511,11 +295,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#endif
#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
-#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
-#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
-#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
-#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
-#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
+#define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
@@ -529,25 +313,18 @@ static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
-#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
-#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
-#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
+#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
-static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
-#if CYTHON_ASSUME_SAFE_MACROS
+#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
-#if PY_MAJOR_VERSION >= 3
-#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
-#else
-#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
-#endif
-#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
@@ -558,7 +335,7 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) {
const char* default_encoding_c;
sys = PyImport_ImportModule("sys");
if (!sys) goto bad;
- default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
Py_DECREF(sys);
if (!default_encoding) goto bad;
default_encoding_c = PyBytes_AsString(default_encoding);
@@ -638,7 +415,6 @@ static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
-static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
@@ -649,7 +425,6 @@ static const char *__pyx_f[] = {
"silx/math/combo.pyx",
"stringsource",
};
-/* MemviewSliceStruct.proto */
struct __pyx_memoryview_obj;
typedef struct {
struct __pyx_memoryview_obj *memview;
@@ -659,7 +434,6 @@ typedef struct {
Py_ssize_t suboffsets[8];
} __Pyx_memviewslice;
-/* BufferFormatStructs.proto */
#define IS_UNSIGNED(type) (((type) -1) > 0)
struct __Pyx_StructField_;
#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
@@ -695,28 +469,26 @@ typedef struct {
char is_valid_array;
} __Pyx_BufFmt_Context;
-/* Atomics.proto */
#include <pythread.h>
#ifndef CYTHON_ATOMICS
#define CYTHON_ATOMICS 1
#endif
#define __pyx_atomic_int_type int
-#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
- (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
+#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 || \
+ (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) && \
!defined(__i386__)
#define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
#define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
#ifdef __PYX_DEBUG_ATOMICS
#warning "Using GNU atomics"
#endif
-#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
+#elif CYTHON_ATOMICS && MSC_VER
#include <Windows.h>
- #undef __pyx_atomic_int_type
#define __pyx_atomic_int_type LONG
#define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
#define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
#ifdef __PYX_DEBUG_ATOMICS
- #pragma message ("Using MSVC atomics")
+ #warning "Using MSVC atomics"
#endif
#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
#define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
@@ -733,14 +505,14 @@ typedef struct {
#endif
typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
#if CYTHON_ATOMICS
- #define __pyx_add_acquisition_count(memview)\
+ #define __pyx_add_acquisition_count(memview) \
__pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
- #define __pyx_sub_acquisition_count(memview)\
+ #define __pyx_sub_acquisition_count(memview) \
__pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
#else
- #define __pyx_add_acquisition_count(memview)\
+ #define __pyx_add_acquisition_count(memview) \
__pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
- #define __pyx_sub_acquisition_count(memview)\
+ #define __pyx_sub_acquisition_count(memview) \
__pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
#endif
@@ -806,6 +578,14 @@ struct __pyx_defaults26;
typedef struct __pyx_defaults26 __pyx_defaults26;
struct __pyx_defaults27;
typedef struct __pyx_defaults27 __pyx_defaults27;
+struct __pyx_defaults28;
+typedef struct __pyx_defaults28 __pyx_defaults28;
+struct __pyx_defaults29;
+typedef struct __pyx_defaults29 __pyx_defaults29;
+struct __pyx_defaults30;
+typedef struct __pyx_defaults30 __pyx_defaults30;
+struct __pyx_defaults31;
+typedef struct __pyx_defaults31 __pyx_defaults31;
struct __pyx_defaults {
int __pyx_arg_min_positive;
};
@@ -890,8 +670,20 @@ struct __pyx_defaults26 {
struct __pyx_defaults27 {
int __pyx_arg_min_positive;
};
+struct __pyx_defaults28 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults29 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults30 {
+ int __pyx_arg_min_positive;
+};
+struct __pyx_defaults31 {
+ int __pyx_arg_min_positive;
+};
-/* "View.MemoryView":103
+/* "View.MemoryView":99
*
* @cname("__pyx_array")
* cdef class array: # <<<<<<<<<<<<<<
@@ -900,7 +692,6 @@ struct __pyx_defaults27 {
*/
struct __pyx_array_obj {
PyObject_HEAD
- struct __pyx_vtabstruct_array *__pyx_vtab;
char *data;
Py_ssize_t len;
char *format;
@@ -916,7 +707,7 @@ struct __pyx_array_obj {
};
-/* "View.MemoryView":275
+/* "View.MemoryView":269
*
* @cname('__pyx_MemviewEnum')
* cdef class Enum(object): # <<<<<<<<<<<<<<
@@ -929,7 +720,7 @@ struct __pyx_MemviewEnum_obj {
};
-/* "View.MemoryView":326
+/* "View.MemoryView":302
*
* @cname('__pyx_memoryview')
* cdef class memoryview(object): # <<<<<<<<<<<<<<
@@ -952,7 +743,7 @@ struct __pyx_memoryview_obj {
};
-/* "View.MemoryView":951
+/* "View.MemoryView":922
*
* @cname('__pyx_memoryviewslice')
* cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
@@ -969,21 +760,7 @@ struct __pyx_memoryviewslice_obj {
-/* "View.MemoryView":103
- *
- * @cname("__pyx_array")
- * cdef class array: # <<<<<<<<<<<<<<
- *
- * cdef:
- */
-
-struct __pyx_vtabstruct_array {
- PyObject *(*get_memview)(struct __pyx_array_obj *);
-};
-static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
-
-
-/* "View.MemoryView":326
+/* "View.MemoryView":302
*
* @cname('__pyx_memoryview')
* cdef class memoryview(object): # <<<<<<<<<<<<<<
@@ -1003,7 +780,7 @@ struct __pyx_vtabstruct_memoryview {
static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
-/* "View.MemoryView":951
+/* "View.MemoryView":922
*
* @cname('__pyx_memoryviewslice')
* cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
@@ -1015,9 +792,6 @@ struct __pyx_vtabstruct__memoryviewslice {
struct __pyx_vtabstruct_memoryview __pyx_base;
};
static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
-
-/* --- Runtime support code (head) --- */
-/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
#define CYTHON_REFNANNY 0
#endif
@@ -1034,19 +808,19 @@ static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
#define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
- if (acquire_gil) {\
- PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
- PyGILState_Release(__pyx_gilstate_save);\
- } else {\
- __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ #define __Pyx_RefNannySetupContext(name, acquire_gil) \
+ if (acquire_gil) { \
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
+ PyGILState_Release(__pyx_gilstate_save); \
+ } else { \
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \
}
#else
- #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ #define __Pyx_RefNannySetupContext(name, acquire_gil) \
__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
- #define __Pyx_RefNannyFinishContext()\
+ #define __Pyx_RefNannyFinishContext() \
__Pyx_RefNanny->FinishContext(&__pyx_refnanny)
#define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
#define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
@@ -1069,19 +843,18 @@ static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
#define __Pyx_XGOTREF(r)
#define __Pyx_XGIVEREF(r)
#endif
-#define __Pyx_XDECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_XDECREF(tmp);\
+#define __Pyx_XDECREF_SET(r, v) do { \
+ PyObject *tmp = (PyObject *) r; \
+ r = v; __Pyx_XDECREF(tmp); \
} while (0)
-#define __Pyx_DECREF_SET(r, v) do {\
- PyObject *tmp = (PyObject *) r;\
- r = v; __Pyx_DECREF(tmp);\
+#define __Pyx_DECREF_SET(r, v) do { \
+ PyObject *tmp = (PyObject *) r; \
+ r = v; __Pyx_DECREF(tmp); \
} while (0)
#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
-/* PyObjectGetAttrStr.proto */
-#if CYTHON_USE_TYPE_SLOTS
+#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
PyTypeObject* tp = Py_TYPE(obj);
if (likely(tp->tp_getattro))
@@ -1096,23 +869,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif
-/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);
-/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
-/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
-/* ParseKeywords.proto */
-static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
- PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \
const char* function_name);
-/* PyObjectSetAttrStr.proto */
-#if CYTHON_USE_TYPE_SLOTS
+#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
PyTypeObject* tp = Py_TYPE(obj);
@@ -1129,86 +897,28 @@ static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif
-/* PyIntBinop.proto */
-#if !CYTHON_COMPILING_IN_PYPY
-static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
-#else
-#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
- PyObject_RichCompare(op1, op2, Py_EQ)
- #endif
-
-/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif
-/* PyThreadStateGet.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
-#define __Pyx_PyThreadState_assign __pyx_tstate = PyThreadState_GET();
-#else
-#define __Pyx_PyThreadState_declare
-#define __Pyx_PyThreadState_assign
-#endif
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb);
-/* PyErrFetchRestore.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
-#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
-#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
-#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
-static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
-#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
-#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
-#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
-#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
-#endif
-
-/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
-/* Import.proto */
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb);
+static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb);
-/* SaveResetException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
-#else
-#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
-#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
-#endif
-
-/* PyErrExceptionMatches.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
-static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
-#else
-#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
-#endif
-
-/* GetException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
-static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-/* PyDictContains.proto */
-static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
+static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) {
int result = PyDict_Contains(dict, item);
return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}
-/* DictGetItem.proto */
-#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
PyObject *value;
value = PyDict_GetItemWithError(d, key);
@@ -1228,94 +938,50 @@ static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif
-/* UnicodeAsUCS4.proto */
-static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);
-
-/* object_ord.proto */
-#if PY_MAJOR_VERSION >= 3
-#define __Pyx_PyObject_Ord(c)\
- (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
-#else
-#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
-#endif
-static long __Pyx__PyObject_Ord(PyObject* c);
-
-/* SetItemInt.proto */
-#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
- (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
+#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \
__Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
int is_list, int wraparound, int boundscheck);
-/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);
-/* PyFunctionFastCall.proto */
-#if CYTHON_FAST_PYCALL
-#define __Pyx_PyFunction_FastCall(func, args, nargs)\
- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
-#if 1 || PY_VERSION_HEX < 0x030600B1
-static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
-#else
-#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
-#endif
-#endif
-
-/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif
-/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif
-/* PyCFunctionFastCall.proto */
-#if CYTHON_FAST_PYCCALL
-static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
-#else
-#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
-#endif
-
-/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
-/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
-/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
-/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
-/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
-/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);
-/* UnpackTuple2.proto */
static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** value1, PyObject** value2,
int is_tuple, int has_known_size, int decref_tuple);
-/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);
-/* ListAppend.proto */
-#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
PyListObject* L = (PyListObject*) list;
Py_ssize_t len = Py_SIZE(list);
@@ -1331,19 +997,12 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif
-/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
-/* BufferFormatCheck.proto */
static CYTHON_INLINE int __Pyx_GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
__Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
-static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
-static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
- __Pyx_BufFmt_StackElem* stack,
- __Pyx_TypeInfo* type); // PROTO
-/* MemviewSliceInit.proto */
#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
#define __Pyx_MEMVIEW_DIRECT 1
#define __Pyx_MEMVIEW_PTR 2
@@ -1369,70 +1028,56 @@ static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
-/* IncludeStringH.proto */
#include <string.h>
-/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
-/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
-/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif
-/* ArgTypeTest.proto */
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
const char *name, int exact);
-/* None.proto */
-static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
+static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); /* proto */
+
+#ifndef __PYX_FORCE_INIT_THREADS
+ #define __PYX_FORCE_INIT_THREADS 0
+#endif
-/* UnaryNegOverflows.proto */
-#define UNARY_NEG_WOULD_OVERFLOW(x)\
- (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
+#define UNARY_NEG_WOULD_OVERFLOW(x) (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
-/* GetAttr.proto */
+static PyObject *get_memview(PyObject *__pyx_v_self); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
-/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
const char* cstring, Py_ssize_t start, Py_ssize_t stop,
const char* encoding, const char* errors,
PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
-/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
-/* SwapException.proto */
-#if CYTHON_FAST_THREAD_STATE
-#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
-static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
-#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
-#endif
-/* GetItemInt.proto */
-#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
- (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \
__Pyx_GetItemInt_Generic(o, to_py_func(i))))
-#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
(PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
int wraparound, int boundscheck);
-#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
- (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
- __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \
(PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
int wraparound, int boundscheck);
@@ -1441,8 +1086,10 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
int is_list, int wraparound, int boundscheck);
static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
-/* ListCompAppend.proto */
-#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static PyObject *__pyx_memoryview_transpose(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_memoryview__get__base(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_memoryview_get_shape(PyObject *__pyx_v_self); /*proto*/
+#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
PyListObject* L = (PyListObject*) list;
Py_ssize_t len = Py_SIZE(list);
@@ -1458,15 +1105,12 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif
-/* PyIntBinop.proto */
-#if !CYTHON_COMPILING_IN_PYPY
-static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
-#else
-#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
- (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
-#endif
-
-/* ListExtend.proto */
+static PyObject *__pyx_memoryview_get_strides(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_memoryview_get_suboffsets(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_memoryview_get_ndim(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_memoryview_get_itemsize(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_memoryview_get_nbytes(PyObject *__pyx_v_self); /*proto*/
+static PyObject *__pyx_memoryview_get_size(PyObject *__pyx_v_self); /*proto*/
static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#if CYTHON_COMPILING_IN_CPYTHON
PyObject* none = _PyList_Extend((PyListObject*)L, v);
@@ -1479,44 +1123,33 @@ static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
#endif
}
-/* None.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
-/* ForceInitThreads.proto */
-#ifndef __PYX_FORCE_INIT_THREADS
- #define __PYX_FORCE_INIT_THREADS 0
-#endif
+static CYTHON_INLINE long __Pyx_div_long(long, long); /* proto */
-/* None.proto */
-static CYTHON_INLINE long __Pyx_div_long(long, long);
-
-/* WriteUnraisableException.proto */
+static PyObject *__pyx_memoryviewslice__get__base(PyObject *__pyx_v_self); /*proto*/
static void __Pyx_WriteUnraisable(const char *name, int clineno,
int lineno, const char *filename,
- int full_traceback, int nogil);
+ int full_traceback);
-/* SetVTable.proto */
static int __Pyx_SetVtable(PyObject *dict, void *vtable);
-/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
-/* FetchCommonType.proto */
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
-/* CythonFunction.proto */
#define __Pyx_CyFunction_USED 1
#include <structmember.h>
#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
#define __Pyx_CYFUNCTION_CCLASS 0x04
-#define __Pyx_CyFunction_GetClosure(f)\
+#define __Pyx_CyFunction_GetClosure(f) \
(((__pyx_CyFunctionObject *) (f))->func_closure)
-#define __Pyx_CyFunction_GetClassObj(f)\
+#define __Pyx_CyFunction_GetClassObj(f) \
(((__pyx_CyFunctionObject *) (f))->func_classobj)
-#define __Pyx_CyFunction_Defaults(type, f)\
+#define __Pyx_CyFunction_Defaults(type, f) \
((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
-#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \
((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
PyCFunctionObject func;
@@ -1540,7 +1173,7 @@ typedef struct {
PyObject *func_annotations;
} __pyx_CyFunctionObject;
static PyTypeObject *__pyx_CyFunctionType = 0;
-#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
__Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
int flags, PyObject* qualname,
@@ -1556,22 +1189,20 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
PyObject *dict);
-static int __pyx_CyFunction_init(void);
+static int __Pyx_CyFunction_init(void);
-/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
-/* FusedFunction.proto */
typedef struct {
__pyx_CyFunctionObject func;
PyObject *__signatures__;
PyObject *type;
PyObject *self;
} __pyx_FusedFunctionObject;
-#define __pyx_FusedFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
+#define __pyx_FusedFunction_NewEx(ml, flags, qualname, self, module, globals, code) \
__pyx_FusedFunction_New(__pyx_FusedFunctionType, ml, flags, qualname, self, module, globals, code)
static PyObject *__pyx_FusedFunction_New(PyTypeObject *type,
PyMethodDef *ml, int flags,
@@ -1583,10 +1214,9 @@ static PyTypeObject *__pyx_FusedFunctionType = NULL;
static int __pyx_FusedFunction_init(void);
#define __Pyx_FusedFunction_USED
-/* CodeObjectCache.proto */
typedef struct {
- PyCodeObject* code_object;
int code_line;
+ PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
int count;
@@ -1598,53 +1228,11 @@ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int co
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
-/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
int py_line, const char *filename);
-#if PY_MAJOR_VERSION < 3
- static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
- static void __Pyx_ReleaseBuffer(Py_buffer *view);
-#else
- #define __Pyx_GetBuffer PyObject_GetBuffer
- #define __Pyx_ReleaseBuffer PyBuffer_Release
-#endif
-
-
-/* BufferStructDeclare.proto */
-typedef struct {
- Py_ssize_t shape, strides, suboffsets;
-} __Pyx_Buf_DimInfo;
-typedef struct {
- size_t refcount;
- Py_buffer pybuffer;
-} __Pyx_Buffer;
-typedef struct {
- __Pyx_Buffer *rcbuffer;
- char *data;
- __Pyx_Buf_DimInfo diminfo[8];
-} __Pyx_LocalBuf_ND;
-
-/* None.proto */
-static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
-static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};
-
-/* MemviewSliceIsContig.proto */
-static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs,
- char order, int ndim);
-
-/* OverlappingSlices.proto */
-static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
- __Pyx_memviewslice *slice2,
- int ndim, size_t itemsize);
-
-/* Capsule.proto */
-static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
-
-/* TypeInfoCompare.proto */
static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
-/* MemviewSliceValidateAndInit.proto */
static int __Pyx_ValidateAndInit_memviewslice(
int *axes_specs,
int c_or_f_flag,
@@ -1655,170 +1243,169 @@ static int __Pyx_ValidateAndInit_memviewslice(
__Pyx_memviewslice *memviewslice,
PyObject *original_obj);
-/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_float(PyObject *);
-/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_double(PyObject *);
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_signed__char(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_long_double(PyObject *);
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_short(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_signed_char(PyObject *);
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_signed_short(PyObject *);
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_long(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_signed_int(PyObject *);
-/* ObjectToMemviewSlice.proto */
-static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_PY_LONG_LONG(PyObject *);
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_signed_long(PyObject *);
+
+static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_signed_PY_LONG_LONG(PyObject *);
-/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(PyObject *);
-/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_short(PyObject *);
-/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_int(PyObject *);
-/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_long(PyObject *);
-/* ObjectToMemviewSlice.proto */
static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_PY_LONG_LONG(PyObject *);
-/* CIntToPy.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+typedef struct {
+ Py_ssize_t shape, strides, suboffsets;
+} __Pyx_Buf_DimInfo;
+typedef struct {
+ size_t refcount;
+ Py_buffer pybuffer;
+} __Pyx_Buffer;
+typedef struct {
+ __Pyx_Buffer *rcbuffer;
+ char *data;
+ __Pyx_Buf_DimInfo diminfo[8];
+} __Pyx_LocalBuf_ND;
+
+#if PY_MAJOR_VERSION < 3
+ static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
+ static void __Pyx_ReleaseBuffer(Py_buffer *view);
+#else
+ #define __Pyx_GetBuffer PyObject_GetBuffer
+ #define __Pyx_ReleaseBuffer PyBuffer_Release
+#endif
+
+
+static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
+static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};
+
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_float(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_float(const char *itemp, PyObject *obj);
+static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
+
+static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character);
+
+static PyObject *__pyx_memview_get_float(const char *itemp);
+static int __pyx_memview_set_float(const char *itemp, PyObject *obj);
-/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
+static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);
+
+static PyObject *__pyx_memview_get_double(const char *itemp);
+static int __pyx_memview_set_double(const char *itemp, PyObject *obj);
+
+static PyObject *__pyx_memview_get_long_double(const char *itemp);
+static int __pyx_memview_set_long_double(const char *itemp, PyObject *obj);
-/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_signed__char(signed char value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_signed__char(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_signed__char(const char *itemp, PyObject *obj);
+static CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *);
+
+static PyObject *__pyx_memview_get_signed_char(const char *itemp);
+static int __pyx_memview_set_signed_char(const char *itemp, PyObject *obj);
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_signed__short(signed short value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_short(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_short(const char *itemp, PyObject *obj);
+static CYTHON_INLINE signed short __Pyx_PyInt_As_signed__short(PyObject *);
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+static PyObject *__pyx_memview_get_signed_short(const char *itemp);
+static int __pyx_memview_set_signed_short(const char *itemp, PyObject *obj);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_signed__int(signed int value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_long(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_long(const char *itemp, PyObject *obj);
+static CYTHON_INLINE signed int __Pyx_PyInt_As_signed__int(PyObject *);
-/* CIntToPy.proto */
-static CYTHON_INLINE PyObject* __Pyx_PyInt_From_PY_LONG_LONG(PY_LONG_LONG value);
+static PyObject *__pyx_memview_get_signed_int(const char *itemp);
+static int __pyx_memview_set_signed_int(const char *itemp, PyObject *obj);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_PY_LONG_LONG(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_PY_LONG_LONG(const char *itemp, PyObject *obj);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_signed__long(signed long value);
+
+static CYTHON_INLINE signed long __Pyx_PyInt_As_signed__long(PyObject *);
+
+static PyObject *__pyx_memview_get_signed_long(const char *itemp);
+static int __pyx_memview_set_signed_long(const char *itemp, PyObject *obj);
+
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_signed__PY_LONG_LONG(signed PY_LONG_LONG value);
+
+static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_As_signed__PY_LONG_LONG(PyObject *);
+
+static PyObject *__pyx_memview_get_signed_PY_LONG_LONG(const char *itemp);
+static int __pyx_memview_set_signed_PY_LONG_LONG(const char *itemp, PyObject *obj);
-/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_char(unsigned char value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_char(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_unsigned_char(const char *itemp, PyObject *obj);
+static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *);
+
+static PyObject *__pyx_memview_get_unsigned_char(const char *itemp);
+static int __pyx_memview_set_unsigned_char(const char *itemp, PyObject *obj);
-/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_short(unsigned short value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_short(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_unsigned_short(const char *itemp, PyObject *obj);
+static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *);
+
+static PyObject *__pyx_memview_get_unsigned_short(const char *itemp);
+static int __pyx_memview_set_unsigned_short(const char *itemp, PyObject *obj);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_int(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_unsigned_int(const char *itemp, PyObject *obj);
+static PyObject *__pyx_memview_get_unsigned_int(const char *itemp);
+static int __pyx_memview_set_unsigned_int(const char *itemp, PyObject *obj);
-/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_long(unsigned long value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_long(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_unsigned_long(const char *itemp, PyObject *obj);
+static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *);
+
+static PyObject *__pyx_memview_get_unsigned_long(const char *itemp);
+static int __pyx_memview_set_unsigned_long(const char *itemp, PyObject *obj);
-/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_PY_LONG_LONG(unsigned PY_LONG_LONG value);
-/* MemviewDtypeToObject.proto */
-static CYTHON_INLINE PyObject *__pyx_memview_get_unsigned_PY_LONG_LONG(const char *itemp);
-static CYTHON_INLINE int __pyx_memview_set_unsigned_PY_LONG_LONG(const char *itemp, PyObject *obj);
+static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *);
+
+static PyObject *__pyx_memview_get_unsigned_PY_LONG_LONG(const char *itemp);
+static int __pyx_memview_set_unsigned_PY_LONG_LONG(const char *itemp, PyObject *obj);
+
+static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice *mvs,
+ char order, int ndim);
+
+static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
+ __Pyx_memviewslice *slice2,
+ int ndim, size_t itemsize);
-/* MemviewSliceCopyTemplate.proto */
static __Pyx_memviewslice
__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
const char *mode, int ndim,
size_t sizeof_dtype, int contig_flag,
int dtype_is_object);
-/* BytesContains.proto */
-static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE signed char __Pyx_PyInt_As_signed__char(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE short __Pyx_PyInt_As_short(PyObject *);
+static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
-/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
-/* CIntFromPy.proto */
-static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_As_PY_LONG_LONG(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE unsigned short __Pyx_PyInt_As_unsigned_short(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE unsigned long __Pyx_PyInt_As_unsigned_long(PyObject *);
-
-/* CIntFromPy.proto */
-static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_As_unsigned_PY_LONG_LONG(PyObject *);
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
-/* CIntFromPy.proto */
-static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
-/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);
-/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
-static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
@@ -1846,8 +1433,6 @@ static PyObject *strided = 0;
static PyObject *indirect = 0;
static PyObject *contiguous = 0;
static PyObject *indirect_contiguous = 0;
-static int __pyx_memoryview_thread_locks_used;
-static PyThread_type_lock __pyx_memoryview_thread_locks[8];
static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
static void *__pyx_align_pointer(void *, size_t); /*proto*/
static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
@@ -1882,11 +1467,12 @@ static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size
static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
static __Pyx_TypeInfo __Pyx_TypeInfo_float = { "float", NULL, sizeof(float), { 0 }, 0, 'R', 0, 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
-static __Pyx_TypeInfo __Pyx_TypeInfo_signed__char = { "signed char", NULL, sizeof(signed char), { 0 }, 0, IS_UNSIGNED(signed char) ? 'U' : 'I', IS_UNSIGNED(signed char), 0 };
-static __Pyx_TypeInfo __Pyx_TypeInfo_short = { "short", NULL, sizeof(short), { 0 }, 0, IS_UNSIGNED(short) ? 'U' : 'I', IS_UNSIGNED(short), 0 };
-static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
-static __Pyx_TypeInfo __Pyx_TypeInfo_long = { "long", NULL, sizeof(long), { 0 }, 0, IS_UNSIGNED(long) ? 'U' : 'I', IS_UNSIGNED(long), 0 };
-static __Pyx_TypeInfo __Pyx_TypeInfo_PY_LONG_LONG = { "long long", NULL, sizeof(PY_LONG_LONG), { 0 }, 0, IS_UNSIGNED(PY_LONG_LONG) ? 'U' : 'I', IS_UNSIGNED(PY_LONG_LONG), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_long_double = { "long double", NULL, sizeof(long double), { 0 }, 0, 'R', 0, 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_signed_char = { "signed char", NULL, sizeof(signed char), { 0 }, 0, IS_UNSIGNED(signed char) ? 'U' : 'I', IS_UNSIGNED(signed char), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_signed_short = { "signed short", NULL, sizeof(signed short), { 0 }, 0, IS_UNSIGNED(signed short) ? 'U' : 'I', IS_UNSIGNED(signed short), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_signed_int = { "signed int", NULL, sizeof(signed int), { 0 }, 0, IS_UNSIGNED(signed int) ? 'U' : 'I', IS_UNSIGNED(signed int), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_signed_long = { "signed long", NULL, sizeof(signed long), { 0 }, 0, IS_UNSIGNED(signed long) ? 'U' : 'I', IS_UNSIGNED(signed long), 0 };
+static __Pyx_TypeInfo __Pyx_TypeInfo_signed_PY_LONG_LONG = { "signed long long", NULL, sizeof(signed PY_LONG_LONG), { 0 }, 0, IS_UNSIGNED(signed PY_LONG_LONG) ? 'U' : 'I', IS_UNSIGNED(signed PY_LONG_LONG), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_char = { "unsigned char", NULL, sizeof(unsigned char), { 0 }, 0, IS_UNSIGNED(unsigned char) ? 'U' : 'I', IS_UNSIGNED(unsigned char), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_short = { "unsigned short", NULL, sizeof(unsigned short), { 0 }, 0, IS_UNSIGNED(unsigned short) ? 'U' : 'I', IS_UNSIGNED(unsigned short), 0 };
static __Pyx_TypeInfo __Pyx_TypeInfo_unsigned_int = { "unsigned int", NULL, sizeof(unsigned int), { 0 }, 0, IS_UNSIGNED(unsigned int) ? 'U' : 'I', IS_UNSIGNED(unsigned int), 0 };
@@ -1902,175 +1488,261 @@ static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_ImportError;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_ord;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_enumerate;
static PyObject *__pyx_builtin_Ellipsis;
+static PyObject *__pyx_builtin_xrange;
static PyObject *__pyx_builtin_id;
-static const char __pyx_k_N[] = "N";
-static const char __pyx_k_O[] = "O";
-static const char __pyx_k_c[] = "c";
-static const char __pyx_k_f[] = "f";
-static const char __pyx_k__3[] = "()";
-static const char __pyx_k__5[] = "|";
-static const char __pyx_k_id[] = "id";
-static const char __pyx_k_MIT[] = "MIT";
-static const char __pyx_k_doc[] = "doc";
-static const char __pyx_k_int[] = "int";
-static const char __pyx_k_key[] = "key";
-static const char __pyx_k_obj[] = "obj";
-static const char __pyx_k_zip[] = "zip";
-static const char __pyx_k_args[] = "args";
-static const char __pyx_k_base[] = "base";
-static const char __pyx_k_copy[] = "copy";
-static const char __pyx_k_data[] = "data";
-static const char __pyx_k_date[] = "__date__";
-static const char __pyx_k_init[] = "__init__";
-static const char __pyx_k_kind[] = "kind";
-static const char __pyx_k_long[] = "long";
-static const char __pyx_k_main[] = "__main__";
-static const char __pyx_k_mode[] = "mode";
-static const char __pyx_k_name[] = "name";
-static const char __pyx_k_ndim[] = "ndim";
-static const char __pyx_k_pack[] = "pack";
-static const char __pyx_k_self[] = "self";
-static const char __pyx_k_size[] = "size";
-static const char __pyx_k_step[] = "step";
-static const char __pyx_k_stop[] = "stop";
-static const char __pyx_k_test[] = "__test__";
-static const char __pyx_k_ASCII[] = "ASCII";
-static const char __pyx_k_array[] = "array";
-static const char __pyx_k_class[] = "__class__";
-static const char __pyx_k_doc_2[] = "__doc__";
-static const char __pyx_k_dtype[] = "dtype";
-static const char __pyx_k_error[] = "error";
-static const char __pyx_k_flags[] = "flags";
-static const char __pyx_k_float[] = "float";
-static const char __pyx_k_index[] = "index";
-static const char __pyx_k_numpy[] = "numpy";
-static const char __pyx_k_range[] = "range";
-static const char __pyx_k_ravel[] = "ravel";
-static const char __pyx_k_shape[] = "shape";
-static const char __pyx_k_short[] = "short";
-static const char __pyx_k_split[] = "split";
-static const char __pyx_k_start[] = "start";
-static const char __pyx_k_strip[] = "strip";
-static const char __pyx_k_value[] = "value";
-static const char __pyx_k_argmax[] = "_argmax";
-static const char __pyx_k_argmin[] = "_argmin";
-static const char __pyx_k_double[] = "double";
-static const char __pyx_k_encode[] = "encode";
-static const char __pyx_k_finite[] = "finite";
-static const char __pyx_k_format[] = "format";
-static const char __pyx_k_import[] = "__import__";
-static const char __pyx_k_kwargs[] = "kwargs";
-static const char __pyx_k_length[] = "length";
-static const char __pyx_k_minpos[] = "minpos";
-static const char __pyx_k_module[] = "__module__";
-static const char __pyx_k_name_2[] = "__name__";
-static const char __pyx_k_object[] = "object";
-static const char __pyx_k_struct[] = "struct";
-static const char __pyx_k_unpack[] = "unpack";
-static const char __pyx_k_authors[] = "__authors__";
-static const char __pyx_k_fortran[] = "fortran";
-static const char __pyx_k_getitem[] = "__getitem__";
-static const char __pyx_k_license[] = "__license__";
-static const char __pyx_k_maximum[] = "_maximum";
-static const char __pyx_k_memview[] = "memview";
-static const char __pyx_k_min_max[] = "_min_max";
-static const char __pyx_k_min_pos[] = "min_pos";
-static const char __pyx_k_minimum[] = "_minimum";
-static const char __pyx_k_ndarray[] = "ndarray";
-static const char __pyx_k_prepare[] = "__prepare__";
-static const char __pyx_k_Ellipsis[] = "Ellipsis";
-static const char __pyx_k_argmax_2[] = "argmax";
-static const char __pyx_k_argmin_2[] = "argmin";
-static const char __pyx_k_defaults[] = "defaults";
-static const char __pyx_k_itemsize[] = "itemsize";
-static const char __pyx_k_property[] = "property";
-static const char __pyx_k_qualname[] = "__qualname__";
-static const char __pyx_k_T_Vincent[] = "T. Vincent";
-static const char __pyx_k_TypeError[] = "TypeError";
-static const char __pyx_k_enumerate[] = "enumerate";
-static const char __pyx_k_long_long[] = "long long";
-static const char __pyx_k_max_index[] = "max_index";
-static const char __pyx_k_maximum_2[] = "maximum";
-static const char __pyx_k_metaclass[] = "__metaclass__";
-static const char __pyx_k_min_index[] = "min_index";
-static const char __pyx_k_min_max_2[] = "min_max";
-static const char __pyx_k_minimum_2[] = "minimum";
-static const char __pyx_k_16_08_2017[] = "16/08/2017";
-static const char __pyx_k_IndexError[] = "IndexError";
-static const char __pyx_k_ValueError[] = "ValueError";
-static const char __pyx_k_argmin_pos[] = "argmin_pos";
-static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
-static const char __pyx_k_signatures[] = "signatures";
-static const char __pyx_k_ImportError[] = "ImportError";
-static const char __pyx_k_MemoryError[] = "MemoryError";
-static const char __pyx_k_signed_char[] = "signed char";
-static const char __pyx_k_MinMaxResult[] = "_MinMaxResult";
-static const char __pyx_k_min_positive[] = "_min_positive";
-static const char __pyx_k_newbyteorder[] = "newbyteorder";
-static const char __pyx_k_unsigned_int[] = "unsigned int";
-static const char __pyx_k_min_pos_index[] = "min_pos_index";
-static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
-static const char __pyx_k_unsigned_char[] = "unsigned char";
-static const char __pyx_k_unsigned_long[] = "unsigned long";
-static const char __pyx_k_AttributeError[] = "AttributeError";
-static const char __pyx_k_finite_min_max[] = "_finite_min_max";
-static const char __pyx_k_min_positive_2[] = "min_positive";
-static const char __pyx_k_unsigned_short[] = "unsigned short";
-static const char __pyx_k_Zero_size_array[] = "Zero-size array";
-static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
-static const char __pyx_k_argmin_positive[] = "_argmin_positive";
-static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
-static const char __pyx_k_silx_math_combo[] = "silx.math.combo";
-static const char __pyx_k_min_max_line_267[] = "min_max (line 267)";
-static const char __pyx_k_argmin_positive_2[] = "argmin_positive";
-static const char __pyx_k_ascontiguousarray[] = "ascontiguousarray";
-static const char __pyx_k_Index_out_of_range[] = "Index out of range";
-static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
-static const char __pyx_k_unsigned_long_long[] = "unsigned long long";
-static const char __pyx_k_MinMaxResult___init[] = "_MinMaxResult.__init__";
-static const char __pyx_k_MinMaxResult_lambda[] = "_MinMaxResult.<lambda>";
-static const char __pyx_k_native_endian_dtype[] = "native_endian_dtype";
-static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
-static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
-static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
-static const char __pyx_k_MinMaxResult___getitem[] = "_MinMaxResult.__getitem__";
-static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
-static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
-static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
-static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
-static const char __pyx_k_Maximum_value_of_the_array[] = "Maximum value of the array";
-static const char __pyx_k_Minimum_value_of_the_array[] = "Minimum value of the array";
-static const char __pyx_k_No_matching_signature_found[] = "No matching signature found";
-static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
-static const char __pyx_k_Expected_at_least_d_arguments[] = "Expected at least %d arguments";
-static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
-static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
-static const char __pyx_k_Object_storing_result_from_func[] = "Object storing result from :func:`min_max`";
-static const char __pyx_k_Strictly_positive_minimum_value[] = "Strictly positive minimum value\n\n It is None if no value is strictly positive.\n ";
-static const char __pyx_k_users_kieffer_workspace_400_rel[] = "/users/kieffer/workspace-400/release/silx/silx/math/combo.pyx";
-static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
-static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
-static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
-static const char __pyx_k_Function_call_with_ambiguous_arg[] = "Function call with ambiguous argument types";
-static const char __pyx_k_Index_of_the_first_occurrence_of[] = "Index of the first occurrence of the minimum value";
-static const char __pyx_k_Index_of_the_strictly_positive_m[] = "Index of the strictly positive minimum value.\n\n It is None if no value is strictly positive.\n It is the index of the first occurrence.";
-static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
-static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
-static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
-static const char __pyx_k_Returns_min_max_and_optionally_s[] = "Returns min, max and optionally strictly positive min of data.\n\n It also computes the indices of first occurrence of min/max.\n\n NaNs are ignored while computing min/max unless all data is NaNs,\n in which case returned min/max are NaNs.\n\n Examples:\n\n >>> import numpy\n >>> data = numpy.arange(10)\n\n Usage as a function returning min and max:\n\n >>> min_, max_ = min_max(data)\n\n Usage as a function returning a result object to access all information:\n\n >>> result = min_max(data) # Do not get positive min\n >>> result.minimum, result.argmin\n 0, 0\n >>> result.maximum, result.argmax\n 9, 10\n >>> result.min_positive, result.argmin_positive # Not computed\n None, None\n\n Getting strictly positive min information:\n\n >>> result = min_max(data, min_positive=True)\n >>> result.min_positive, result.argmin_positive # Computed\n 1, 1\n\n If *finite* is True, min/max information is computed only from finite data.\n Then, all result fields (include minimum and maximum) can be None\n when all data is infinity or NaN.\n\n :param data: Array-like dataset\n :param bool min_positive: True to compute the positive min and argmin\n Default: False.\n :param bool finite: True to compute min/max from finite data only\n Default: False.\n :returns: An object with minimum, maximum and min_positive attributes\n and the indices of first occurrence in the flattened data:\n argmin, argmax and argmin_positive attributes.\n If all data is <= 0 or min_positive argument is False, then\n min_positive and argmin_positive are None.\n :raises: ValueError if data is empty\n ";
-static const char __pyx_k_This_module_provides_combination[] = "This module provides combination of statistics as single operation.\n\nFor now it provides min/max (and optionally positive min) and indices\nof first occurrences (i.e., argmin/argmax) in a single pass.\n";
-static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
-static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
-static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
-static const char __pyx_k_Index_of_the_first_occurrence_of_2[] = "Index of the first occurrence of the maximum value";
-static PyObject *__pyx_kp_s_16_08_2017;
-static PyObject *__pyx_n_s_ASCII;
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda6(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_minimum, PyObject *__pyx_v_min_pos, PyObject *__pyx_v_maximum, PyObject *__pyx_v_argmin, PyObject *__pyx_v_argmin_pos, PyObject *__pyx_v_argmax); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_68__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_70__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_72__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_74__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_76__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_78__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_80__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_82__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_84__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_86__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_24_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_88__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_26_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_90__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_28_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_92__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_30_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_2_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_100__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_34_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_102__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_36_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_104__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_38_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
+static PyObject *__pyx_pf_4silx_4math_5combo_4min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, int __pyx_v_min_positive, int __pyx_v_finite); /* proto */
+static int __pyx_array_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
+static int __pyx_array_getbuffer_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
+static void __pyx_array_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
+static PyObject *get_memview_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_array_MemoryView_5array_6__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
+static PyObject *__pyx_array_MemoryView_5array_8__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
+static int __pyx_array_MemoryView_5array_10__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
+static int __pyx_MemviewEnum_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
+static PyObject *__pyx_MemviewEnum_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
+static int __pyx_memoryview_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
+static void __pyx_memoryview_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
+static int __pyx_memoryview_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
+static int __pyx_memoryview_getbuffer_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
+static PyObject *__pyx_memoryview_transpose_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview__get__base_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_get_shape_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_get_strides_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_get_suboffsets_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_get_ndim_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_get_itemsize_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_get_nbytes_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_get_size_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static Py_ssize_t __pyx_memoryview_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryview_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
+static void __pyx_memoryviewslice_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_memoryviewslice__get__base_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
+static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static char __pyx_k_N[] = "N";
+static char __pyx_k_O[] = "O";
+static char __pyx_k_c[] = "c";
+static char __pyx_k_f[] = "f";
+static char __pyx_k__3[] = "()";
+static char __pyx_k__5[] = "|";
+static char __pyx_k_id[] = "id";
+static char __pyx_k_MIT[] = "MIT";
+static char __pyx_k_doc[] = "doc";
+static char __pyx_k_key[] = "key";
+static char __pyx_k_obj[] = "obj";
+static char __pyx_k_ord[] = "ord";
+static char __pyx_k_zip[] = "zip";
+static char __pyx_k_args[] = "args";
+static char __pyx_k_base[] = "base";
+static char __pyx_k_copy[] = "copy";
+static char __pyx_k_data[] = "data";
+static char __pyx_k_date[] = "__date__";
+static char __pyx_k_init[] = "__init__";
+static char __pyx_k_kind[] = "kind";
+static char __pyx_k_main[] = "__main__";
+static char __pyx_k_mode[] = "mode";
+static char __pyx_k_name[] = "name";
+static char __pyx_k_ndim[] = "ndim";
+static char __pyx_k_pack[] = "pack";
+static char __pyx_k_self[] = "self";
+static char __pyx_k_size[] = "size";
+static char __pyx_k_step[] = "step";
+static char __pyx_k_stop[] = "stop";
+static char __pyx_k_test[] = "__test__";
+static char __pyx_k_array[] = "array";
+static char __pyx_k_class[] = "__class__";
+static char __pyx_k_doc_2[] = "__doc__";
+static char __pyx_k_dtype[] = "dtype";
+static char __pyx_k_error[] = "error";
+static char __pyx_k_flags[] = "flags";
+static char __pyx_k_float[] = "float";
+static char __pyx_k_index[] = "index";
+static char __pyx_k_numpy[] = "numpy";
+static char __pyx_k_range[] = "range";
+static char __pyx_k_ravel[] = "ravel";
+static char __pyx_k_shape[] = "shape";
+static char __pyx_k_split[] = "split";
+static char __pyx_k_start[] = "start";
+static char __pyx_k_strip[] = "strip";
+static char __pyx_k_value[] = "value";
+static char __pyx_k_argmax[] = "_argmax";
+static char __pyx_k_argmin[] = "_argmin";
+static char __pyx_k_double[] = "double";
+static char __pyx_k_finite[] = "finite";
+static char __pyx_k_format[] = "format";
+static char __pyx_k_import[] = "__import__";
+static char __pyx_k_kwargs[] = "kwargs";
+static char __pyx_k_length[] = "length";
+static char __pyx_k_module[] = "__module__";
+static char __pyx_k_name_2[] = "__name__";
+static char __pyx_k_object[] = "object";
+static char __pyx_k_struct[] = "struct";
+static char __pyx_k_unpack[] = "unpack";
+static char __pyx_k_xrange[] = "xrange";
+static char __pyx_k_authors[] = "__authors__";
+static char __pyx_k_fortran[] = "fortran";
+static char __pyx_k_getitem[] = "__getitem__";
+static char __pyx_k_license[] = "__license__";
+static char __pyx_k_maximum[] = "_maximum";
+static char __pyx_k_memview[] = "memview";
+static char __pyx_k_min_max[] = "_min_max";
+static char __pyx_k_min_pos[] = "min_pos";
+static char __pyx_k_minimum[] = "_minimum";
+static char __pyx_k_ndarray[] = "ndarray";
+static char __pyx_k_prepare[] = "__prepare__";
+static char __pyx_k_Ellipsis[] = "Ellipsis";
+static char __pyx_k_argmax_2[] = "argmax";
+static char __pyx_k_argmin_2[] = "argmin";
+static char __pyx_k_defaults[] = "defaults";
+static char __pyx_k_itemsize[] = "itemsize";
+static char __pyx_k_property[] = "property";
+static char __pyx_k_qualname[] = "__qualname__";
+static char __pyx_k_T_Vincent[] = "T. Vincent";
+static char __pyx_k_TypeError[] = "TypeError";
+static char __pyx_k_enumerate[] = "enumerate";
+static char __pyx_k_max_index[] = "max_index";
+static char __pyx_k_maximum_2[] = "maximum";
+static char __pyx_k_metaclass[] = "__metaclass__";
+static char __pyx_k_min_index[] = "min_index";
+static char __pyx_k_min_max_2[] = "min_max";
+static char __pyx_k_minimum_2[] = "minimum";
+static char __pyx_k_18_10_2017[] = "18/10/2017";
+static char __pyx_k_IndexError[] = "IndexError";
+static char __pyx_k_ValueError[] = "ValueError";
+static char __pyx_k_argmin_pos[] = "argmin_pos";
+static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
+static char __pyx_k_signatures[] = "signatures";
+static char __pyx_k_signed_int[] = "signed int";
+static char __pyx_k_ImportError[] = "ImportError";
+static char __pyx_k_MemoryError[] = "MemoryError";
+static char __pyx_k_long_double[] = "long double";
+static char __pyx_k_signed_char[] = "signed char";
+static char __pyx_k_signed_long[] = "signed long";
+static char __pyx_k_MinMaxResult[] = "_MinMaxResult";
+static char __pyx_k_min_positive[] = "_min_positive";
+static char __pyx_k_newbyteorder[] = "newbyteorder";
+static char __pyx_k_signed_short[] = "signed short";
+static char __pyx_k_unsigned_int[] = "unsigned int";
+static char __pyx_k_min_pos_index[] = "min_pos_index";
+static char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
+static char __pyx_k_unsigned_char[] = "unsigned char";
+static char __pyx_k_unsigned_long[] = "unsigned long";
+static char __pyx_k_AttributeError[] = "AttributeError";
+static char __pyx_k_finite_min_max[] = "_finite_min_max";
+static char __pyx_k_min_positive_2[] = "min_positive";
+static char __pyx_k_unsigned_short[] = "unsigned short";
+static char __pyx_k_Zero_size_array[] = "Zero-size array";
+static char __pyx_k_allocate_buffer[] = "allocate_buffer";
+static char __pyx_k_argmin_positive[] = "_argmin_positive";
+static char __pyx_k_dtype_is_object[] = "dtype_is_object";
+static char __pyx_k_silx_math_combo[] = "silx.math.combo";
+static char __pyx_k_min_max_line_276[] = "min_max (line 276)";
+static char __pyx_k_signed_long_long[] = "signed long long";
+static char __pyx_k_argmin_positive_2[] = "argmin_positive";
+static char __pyx_k_ascontiguousarray[] = "ascontiguousarray";
+static char __pyx_k_Index_out_of_range[] = "Index out of range";
+static char __pyx_k_strided_and_direct[] = "<strided and direct>";
+static char __pyx_k_unsigned_long_long[] = "unsigned long long";
+static char __pyx_k_MinMaxResult___init[] = "_MinMaxResult.__init__";
+static char __pyx_k_MinMaxResult_lambda[] = "_MinMaxResult.<lambda>";
+static char __pyx_k_native_endian_dtype[] = "native_endian_dtype";
+static char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
+static char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
+static char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
+static char __pyx_k_MinMaxResult___getitem[] = "_MinMaxResult.__getitem__";
+static char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
+static char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
+static char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
+static char __pyx_k_getbuffer_obj_view_flags[] = "getbuffer(obj, view, flags)";
+static char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct";
+static char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
+static char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)";
+static char __pyx_k_Maximum_value_of_the_array[] = "Maximum value of the array";
+static char __pyx_k_Minimum_value_of_the_array[] = "Minimum value of the array";
+static char __pyx_k_No_matching_signature_found[] = "No matching signature found";
+static char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)";
+static char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
+static char __pyx_k_Expected_at_least_d_arguments[] = "Expected at least %d arguments";
+static char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
+static char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
+static char __pyx_k_Object_storing_result_from_func[] = "Object storing result from :func:`min_max`";
+static char __pyx_k_Strictly_positive_minimum_value[] = "Strictly positive minimum value\n\n It is None if no value is strictly positive.\n ";
+static char __pyx_k_users_tvincent_src_silx_silx_ma[] = "/users/tvincent/src/silx/silx/math/combo.pyx";
+static char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
+static char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
+static char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
+static char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions";
+static char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
+static char __pyx_k_Function_call_with_ambiguous_arg[] = "Function call with ambiguous argument types";
+static char __pyx_k_Index_of_the_first_occurrence_of[] = "Index of the first occurrence of the minimum value";
+static char __pyx_k_Index_of_the_strictly_positive_m[] = "Index of the strictly positive minimum value.\n\n It is None if no value is strictly positive.\n It is the index of the first occurrence.";
+static char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
+static char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
+static char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
+static char __pyx_k_Returns_min_max_and_optionally_s[] = "Returns min, max and optionally strictly positive min of data.\n\n It also computes the indices of first occurrence of min/max.\n\n NaNs are ignored while computing min/max unless all data is NaNs,\n in which case returned min/max are NaNs.\n\n Examples:\n\n >>> import numpy\n >>> data = numpy.arange(10)\n\n Usage as a function returning min and max:\n\n >>> min_, max_ = min_max(data)\n\n Usage as a function returning a result object to access all information:\n\n >>> result = min_max(data) # Do not get positive min\n >>> result.minimum, result.argmin\n 0, 0\n >>> result.maximum, result.argmax\n 9, 10\n >>> result.min_positive, result.argmin_positive # Not computed\n None, None\n\n Getting strictly positive min information:\n\n >>> result = min_max(data, min_positive=True)\n >>> result.min_positive, result.argmin_positive # Computed\n 1, 1\n\n If *finite* is True, min/max information is computed only from finite data.\n Then, all result fields (include minimum and maximum) can be None\n when all data is infinity or NaN.\n\n :param data: Array-like dataset\n :param bool min_positive: True to compute the positive min and argmin\n Default: False.\n :param bool finite: True to compute min/max from finite data only\n Default: False.\n :returns: An object with minimum, maximum and min_positive attributes\n and the indices of first occurrence in the flattened data:\n argmin, argmax and argmin_positive attributes.\n If all data is <= 0 or min_positive argument is False, then\n min_positive and argmin_positive are None.\n :raises: ValueError if data is empty\n ";
+static char __pyx_k_This_module_provides_combination[] = "This module provides combination of statistics as single operation.\n\nFor now it provides min/max (and optionally positive min) and indices\nof first occurrences (i.e., argmin/argmax) in a single pass.\n";
+static char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
+static char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
+static char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
+static char __pyx_k_Index_of_the_first_occurrence_of_2[] = "Index of the first occurrence of the maximum value";
+static PyObject *__pyx_kp_s_18_10_2017;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
@@ -2139,7 +1811,6 @@ static PyObject *__pyx_n_s_doc_2;
static PyObject *__pyx_n_s_double;
static PyObject *__pyx_n_s_dtype;
static PyObject *__pyx_n_s_dtype_is_object;
-static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_enumerate;
static PyObject *__pyx_n_s_error;
static PyObject *__pyx_n_s_f;
@@ -2156,7 +1827,6 @@ static PyObject *__pyx_n_s_id;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_init;
-static PyObject *__pyx_n_s_int;
static PyObject *__pyx_n_s_itemsize;
static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
static PyObject *__pyx_n_s_key;
@@ -2164,8 +1834,7 @@ static PyObject *__pyx_n_s_kind;
static PyObject *__pyx_n_s_kwargs;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_license;
-static PyObject *__pyx_n_s_long;
-static PyObject *__pyx_kp_s_long_long;
+static PyObject *__pyx_kp_s_long_double;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_max_index;
static PyObject *__pyx_n_s_maximum;
@@ -2175,14 +1844,13 @@ static PyObject *__pyx_n_s_metaclass;
static PyObject *__pyx_n_s_min_index;
static PyObject *__pyx_n_s_min_max;
static PyObject *__pyx_n_s_min_max_2;
-static PyObject *__pyx_kp_u_min_max_line_267;
+static PyObject *__pyx_kp_u_min_max_line_276;
static PyObject *__pyx_n_s_min_pos;
static PyObject *__pyx_n_s_min_pos_index;
static PyObject *__pyx_n_s_min_positive;
static PyObject *__pyx_n_s_min_positive_2;
static PyObject *__pyx_n_s_minimum;
static PyObject *__pyx_n_s_minimum_2;
-static PyObject *__pyx_n_s_minpos;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_module;
static PyObject *__pyx_n_s_name;
@@ -2194,6 +1862,7 @@ static PyObject *__pyx_n_s_newbyteorder;
static PyObject *__pyx_n_s_numpy;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_ord;
static PyObject *__pyx_n_s_pack;
static PyObject *__pyx_n_s_prepare;
static PyObject *__pyx_n_s_property;
@@ -2204,9 +1873,12 @@ static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_ravel;
static PyObject *__pyx_n_s_self;
static PyObject *__pyx_n_s_shape;
-static PyObject *__pyx_n_s_short;
static PyObject *__pyx_n_s_signatures;
static PyObject *__pyx_kp_s_signed_char;
+static PyObject *__pyx_kp_s_signed_int;
+static PyObject *__pyx_kp_s_signed_long;
+static PyObject *__pyx_kp_s_signed_long_long;
+static PyObject *__pyx_kp_s_signed_short;
static PyObject *__pyx_n_s_silx_math_combo;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_split;
@@ -2227,89 +1899,15 @@ static PyObject *__pyx_kp_s_unsigned_int;
static PyObject *__pyx_kp_s_unsigned_long;
static PyObject *__pyx_kp_s_unsigned_long_long;
static PyObject *__pyx_kp_s_unsigned_short;
-static PyObject *__pyx_kp_s_users_kieffer_workspace_400_rel;
+static PyObject *__pyx_kp_s_users_tvincent_src_silx_silx_ma;
static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_xrange;
static PyObject *__pyx_n_s_zip;
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_minimum, PyObject *__pyx_v_min_pos, PyObject *__pyx_v_maximum, PyObject *__pyx_v_argmin, PyObject *__pyx_v_argmin_pos, PyObject *__pyx_v_argmax); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_62__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_64__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_66__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_68__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_70__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_72__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_74__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_76__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_78__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_80__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_24_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_82__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_26_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_84__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_28_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_2_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_90__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_32_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_92__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_34_finite_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive); /* proto */
-static PyObject *__pyx_pf_4silx_4math_5combo_4min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, int __pyx_v_min_positive, int __pyx_v_finite); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
-static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
-static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
-static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
-static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
-static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
-static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
-static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
-static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
-static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
-static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_neg_1;
static PyObject *__pyx_k__2;
-static PyObject *__pyx_k__21;
+static PyObject *__pyx_k__22;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__6;
@@ -2330,7 +1928,7 @@ static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
-static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
@@ -2363,7 +1961,7 @@ static PyObject *__pyx_codeobj__47;
static PyObject *__pyx_codeobj__49;
static PyObject *__pyx_codeobj__51;
-/* "silx/math/combo.pyx":81
+/* "silx/math/combo.pyx":90
*
* minimum = property(
* lambda self: self._minimum, # <<<<<<<<<<<<<<
@@ -2372,26 +1970,29 @@ static PyObject *__pyx_codeobj__51;
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_4lambda = {"lambda", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda, METH_O, 0};
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_4lambda1 = {"lambda1", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda1, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_4lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(__pyx_self, ((PyObject *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("lambda", 0);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda1", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minimum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minimum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -2400,7 +2001,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -2408,7 +2009,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(
return __pyx_r;
}
-/* "silx/math/combo.pyx":84
+/* "silx/math/combo.pyx":93
* doc="Minimum value of the array")
* maximum = property(
* lambda self: self._maximum, # <<<<<<<<<<<<<<
@@ -2417,26 +2018,29 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda(
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_5lambda1 = {"lambda1", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda1, METH_O, 0};
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda1(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_5lambda2 = {"lambda2", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda2, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_5lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(__pyx_self, ((PyObject *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("lambda1", 0);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda2", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maximum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maximum); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -2445,7 +2049,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -2453,7 +2057,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1
return __pyx_r;
}
-/* "silx/math/combo.pyx":88
+/* "silx/math/combo.pyx":97
*
* argmin = property(
* lambda self: self._argmin, # <<<<<<<<<<<<<<
@@ -2462,26 +2066,29 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda1
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_6lambda2 = {"lambda2", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda2, METH_O, 0};
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda2(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda3(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_6lambda3 = {"lambda3", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda3, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_6lambda3(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(__pyx_self, ((PyObject *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("lambda2", 0);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda3", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -2490,7 +2097,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -2498,7 +2105,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2
return __pyx_r;
}
-/* "silx/math/combo.pyx":91
+/* "silx/math/combo.pyx":100
* doc="Index of the first occurrence of the minimum value")
* argmax = property(
* lambda self: self._argmax, # <<<<<<<<<<<<<<
@@ -2507,26 +2114,29 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda2
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda3(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_7lambda3 = {"lambda3", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda3, METH_O, 0};
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda3(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda4(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_7lambda4 = {"lambda4", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda4, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_7lambda4(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(__pyx_self, ((PyObject *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("lambda3", 0);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda4", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmax); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -2535,7 +2145,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -2543,7 +2153,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3
return __pyx_r;
}
-/* "silx/math/combo.pyx":95
+/* "silx/math/combo.pyx":104
*
* min_positive = property(
* lambda self: self._min_positive, # <<<<<<<<<<<<<<
@@ -2552,26 +2162,29 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda3
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda4(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_8lambda4 = {"lambda4", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda4, METH_O, 0};
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda4(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda5(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_8lambda5 = {"lambda5", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda5, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_8lambda5(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda4 (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(__pyx_self, ((PyObject *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("lambda4", 0);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda5", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -2580,7 +2193,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda4", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -2588,7 +2201,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4
return __pyx_r;
}
-/* "silx/math/combo.pyx":101
+/* "silx/math/combo.pyx":110
* """)
* argmin_positive = property(
* lambda self: self._argmin_positive, # <<<<<<<<<<<<<<
@@ -2597,26 +2210,29 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda4
*/
/* Python wrapper */
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda5(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
-static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_9lambda5 = {"lambda5", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda5, METH_O, 0};
-static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda5(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda6(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_9lambda6 = {"lambda6", (PyCFunction)__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda6, METH_O, 0};
+static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_9lambda6(PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
- __Pyx_RefNannySetupContext("lambda5 (wrapper)", 0);
- __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(__pyx_self, ((PyObject *)__pyx_v_self));
+ __Pyx_RefNannySetupContext("lambda6 (wrapper)", 0);
+ __pyx_r = __pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda6(__pyx_self, ((PyObject *)__pyx_v_self));
/* function exit code */
__Pyx_RefNannyFinishContext();
return __pyx_r;
}
-static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda6(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
- __Pyx_RefNannySetupContext("lambda5", 0);
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
+ __Pyx_RefNannySetupContext("lambda6", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmin_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_argmin_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -2625,7 +2241,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
- __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda5", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_AddTraceback("silx.math.combo._MinMaxResult.lambda6", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
@@ -2633,7 +2249,7 @@ static PyObject *__pyx_lambda_funcdef_4silx_4math_5combo_13_MinMaxResult_lambda5
return __pyx_r;
}
-/* "silx/math/combo.pyx":70
+/* "silx/math/combo.pyx":79
* """Object storing result from :func:`min_max`"""
*
* def __init__(self, minimum, min_pos, maximum, # <<<<<<<<<<<<<<
@@ -2653,6 +2269,9 @@ static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_1__init__(PyObject
PyObject *__pyx_v_argmin = 0;
PyObject *__pyx_v_argmin_pos = 0;
PyObject *__pyx_v_argmax = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
@@ -2681,36 +2300,36 @@ static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_1__init__(PyObject
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_minimum_2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 1); __PYX_ERR(0, 70, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_pos)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 2); __PYX_ERR(0, 70, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_maximum_2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 3); __PYX_ERR(0, 70, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 4:
if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_argmin_2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 4); __PYX_ERR(0, 70, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 4); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 5:
if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_argmin_pos)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 5); __PYX_ERR(0, 70, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 5); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 6:
if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_argmax_2)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 6); __PYX_ERR(0, 70, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, 6); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 70, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
goto __pyx_L5_argtuple_error;
@@ -2733,7 +2352,7 @@ static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_1__init__(PyObject
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 70, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._MinMaxResult.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -2749,63 +2368,66 @@ static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_1__init__(PyObject
static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_minimum, PyObject *__pyx_v_min_pos, PyObject *__pyx_v_maximum, PyObject *__pyx_v_argmin, PyObject *__pyx_v_argmin_pos, PyObject *__pyx_v_argmax) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__init__", 0);
- /* "silx/math/combo.pyx":72
+ /* "silx/math/combo.pyx":81
* def __init__(self, minimum, min_pos, maximum,
* argmin, argmin_pos, argmax):
* self._minimum = minimum # <<<<<<<<<<<<<<
* self._min_positive = min_pos
* self._maximum = maximum
*/
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_minimum, __pyx_v_minimum) < 0) __PYX_ERR(0, 72, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_minimum, __pyx_v_minimum) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "silx/math/combo.pyx":73
+ /* "silx/math/combo.pyx":82
* argmin, argmin_pos, argmax):
* self._minimum = minimum
* self._min_positive = min_pos # <<<<<<<<<<<<<<
* self._maximum = maximum
*
*/
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_min_positive, __pyx_v_min_pos) < 0) __PYX_ERR(0, 73, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_min_positive, __pyx_v_min_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "silx/math/combo.pyx":74
+ /* "silx/math/combo.pyx":83
* self._minimum = minimum
* self._min_positive = min_pos
* self._maximum = maximum # <<<<<<<<<<<<<<
*
* self._argmin = argmin
*/
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_maximum, __pyx_v_maximum) < 0) __PYX_ERR(0, 74, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_maximum, __pyx_v_maximum) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "silx/math/combo.pyx":76
+ /* "silx/math/combo.pyx":85
* self._maximum = maximum
*
* self._argmin = argmin # <<<<<<<<<<<<<<
* self._argmin_positive = argmin_pos
* self._argmax = argmax
*/
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmin, __pyx_v_argmin) < 0) __PYX_ERR(0, 76, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmin, __pyx_v_argmin) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "silx/math/combo.pyx":77
+ /* "silx/math/combo.pyx":86
*
* self._argmin = argmin
* self._argmin_positive = argmin_pos # <<<<<<<<<<<<<<
* self._argmax = argmax
*
*/
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmin_positive, __pyx_v_argmin_pos) < 0) __PYX_ERR(0, 77, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmin_positive, __pyx_v_argmin_pos) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "silx/math/combo.pyx":78
+ /* "silx/math/combo.pyx":87
* self._argmin = argmin
* self._argmin_positive = argmin_pos
* self._argmax = argmax # <<<<<<<<<<<<<<
*
* minimum = property(
*/
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmax, __pyx_v_argmax) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_argmax, __pyx_v_argmax) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- /* "silx/math/combo.pyx":70
+ /* "silx/math/combo.pyx":79
* """Object storing result from :func:`min_max`"""
*
* def __init__(self, minimum, min_pos, maximum, # <<<<<<<<<<<<<<
@@ -2825,7 +2447,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult___init__(CYTHON_UNU
return __pyx_r;
}
-/* "silx/math/combo.pyx":107
+/* "silx/math/combo.pyx":116
* It is the index of the first occurrence.""")
*
* def __getitem__(self, key): # <<<<<<<<<<<<<<
@@ -2840,6 +2462,9 @@ static PyMethodDef __pyx_mdef_4silx_4math_5combo_13_MinMaxResult_3__getitem__ =
static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_3__getitem__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_self = 0;
PyObject *__pyx_v_key = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
@@ -2863,11 +2488,11 @@ static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_3__getitem__(PyObje
case 1:
if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); __PYX_ERR(0, 107, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) __PYX_ERR(0, 107, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__getitem__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
goto __pyx_L5_argtuple_error;
@@ -2880,7 +2505,7 @@ static PyObject *__pyx_pw_4silx_4math_5combo_13_MinMaxResult_3__getitem__(PyObje
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 107, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__getitem__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._MinMaxResult.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -2898,22 +2523,24 @@ static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(CYTHON
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
int __pyx_t_2;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__getitem__", 0);
- /* "silx/math/combo.pyx":108
+ /* "silx/math/combo.pyx":117
*
* def __getitem__(self, key):
* if key == 0: # <<<<<<<<<<<<<<
* return self.minimum
* elif key == 1:
*/
- __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 108, __pyx_L1_error)
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "silx/math/combo.pyx":109
+ /* "silx/math/combo.pyx":118
* def __getitem__(self, key):
* if key == 0:
* return self.minimum # <<<<<<<<<<<<<<
@@ -2921,35 +2548,26 @@ static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(CYTHON
* return self.maximum
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minimum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_minimum_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
-
- /* "silx/math/combo.pyx":108
- *
- * def __getitem__(self, key):
- * if key == 0: # <<<<<<<<<<<<<<
- * return self.minimum
- * elif key == 1:
- */
}
- /* "silx/math/combo.pyx":110
+ /* "silx/math/combo.pyx":119
* if key == 0:
* return self.minimum
* elif key == 1: # <<<<<<<<<<<<<<
* return self.maximum
* else:
*/
- __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_key, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, __pyx_int_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
if (__pyx_t_2) {
- /* "silx/math/combo.pyx":111
+ /* "silx/math/combo.pyx":120
* return self.minimum
* elif key == 1:
* return self.maximum # <<<<<<<<<<<<<<
@@ -2957,37 +2575,29 @@ static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(CYTHON
* raise IndexError("Index out of range")
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maximum_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_maximum_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
-
- /* "silx/math/combo.pyx":110
- * if key == 0:
- * return self.minimum
- * elif key == 1: # <<<<<<<<<<<<<<
- * return self.maximum
- * else:
- */
}
+ /*else*/ {
- /* "silx/math/combo.pyx":113
+ /* "silx/math/combo.pyx":122
* return self.maximum
* else:
* raise IndexError("Index out of range") # <<<<<<<<<<<<<<
*
*
*/
- /*else*/ {
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 113, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":107
+ /* "silx/math/combo.pyx":116
* It is the index of the first occurrence.""")
*
* def __getitem__(self, key): # <<<<<<<<<<<<<<
@@ -3006,7 +2616,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_13_MinMaxResult_2__getitem__(CYTHON
return __pyx_r;
}
-/* "silx/math/combo.pyx":119
+/* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -3023,6 +2633,9 @@ static PyObject *__pyx_pw_4silx_4math_5combo_1_min_max(PyObject *__pyx_self, PyO
PyObject *__pyx_v_args = 0;
PyObject *__pyx_v_kwargs = 0;
CYTHON_UNUSED PyObject *__pyx_v_defaults = 0;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__pyx_fused_cpdef (wrapper)", 0);
@@ -3054,16 +2667,16 @@ static PyObject *__pyx_pw_4silx_4math_5combo_1_min_max(PyObject *__pyx_self, PyO
case 2:
if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_kwargs)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 2); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
case 3:
if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_defaults)) != 0)) kw_args--;
else {
- __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 3); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_fused_cpdef") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_fused_cpdef") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
goto __pyx_L5_argtuple_error;
@@ -3080,7 +2693,7 @@ static PyObject *__pyx_pw_4silx_4math_5combo_1_min_max(PyObject *__pyx_self, PyO
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("__pyx_fused_cpdef", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -3095,22 +2708,22 @@ static PyObject *__pyx_pw_4silx_4math_5combo_1_min_max(PyObject *__pyx_self, PyO
static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_signatures, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs, CYTHON_UNUSED PyObject *__pyx_v_defaults) {
PyObject *__pyx_v_dest_sig = NULL;
- PyTypeObject *__pyx_v_ndarray = 0;
+ PyObject *__pyx_v_ndarray = 0;
PyObject *__pyx_v_numpy = NULL;
__Pyx_memviewslice __pyx_v_memslice;
Py_ssize_t __pyx_v_itemsize;
int __pyx_v_dtype_signed;
char __pyx_v_kind;
- int __pyx_v_long_is_signed;
- int __pyx_v_long_long_is_signed;
- int __pyx_v_unsigned_short_is_signed;
- int __pyx_v_short_is_signed;
- int __pyx_v_int_is_signed;
- int __pyx_v_unsigned_long_long_is_signed;
int __pyx_v_signed_char_is_signed;
+ int __pyx_v_unsigned_int_is_signed;
+ int __pyx_v_signed_int_is_signed;
+ int __pyx_v_unsigned_long_long_is_signed;
int __pyx_v_unsigned_long_is_signed;
+ int __pyx_v_signed_short_is_signed;
+ int __pyx_v_unsigned_short_is_signed;
+ int __pyx_v_signed_long_is_signed;
int __pyx_v_unsigned_char_is_signed;
- int __pyx_v_unsigned_int_is_signed;
+ int __pyx_v_signed_long_long_is_signed;
PyObject *__pyx_v_arg = NULL;
PyObject *__pyx_v_dtype = NULL;
PyObject *__pyx_v_arg_base = NULL;
@@ -3131,50 +2744,52 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
PyObject *__pyx_t_8 = NULL;
PyObject *__pyx_t_9 = NULL;
Py_ssize_t __pyx_t_10;
- long __pyx_t_11;
- __Pyx_memviewslice __pyx_t_12;
- Py_ssize_t __pyx_t_13;
- int __pyx_t_14;
- Py_ssize_t __pyx_t_15;
- PyObject *(*__pyx_t_16)(PyObject *);
+ char __pyx_t_11;
+ Py_ssize_t __pyx_t_12;
+ int __pyx_t_13;
+ Py_ssize_t __pyx_t_14;
+ PyObject *(*__pyx_t_15)(PyObject *);
+ PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
PyObject *__pyx_t_18 = NULL;
- PyObject *__pyx_t_19 = NULL;
- PyObject *(*__pyx_t_20)(PyObject *);
- int __pyx_t_21;
+ PyObject *(*__pyx_t_19)(PyObject *);
+ int __pyx_t_20;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("_min_max", 0);
__Pyx_INCREF(__pyx_v_kwargs);
- __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyList_SET_ITEM(__pyx_t_1, 0, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_v_dest_sig = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
__pyx_t_2 = (__pyx_v_kwargs == Py_None);
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF_SET(__pyx_v_kwargs, __pyx_t_1);
__pyx_t_1 = 0;
+ goto __pyx_L3;
}
+ __pyx_L3:;
{
- __Pyx_PyThreadState_declare
- __Pyx_PyThreadState_assign
__Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
__Pyx_XGOTREF(__pyx_t_4);
__Pyx_XGOTREF(__pyx_t_5);
__Pyx_XGOTREF(__pyx_t_6);
/*try:*/ {
- __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L4_error)
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_1);
__pyx_v_numpy = __pyx_t_1;
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_numpy, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L4_error)
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_numpy, __pyx_n_s_ndarray); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
__Pyx_GOTREF(__pyx_t_1);
- if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 119, __pyx_L4_error)
- __pyx_v_ndarray = ((PyTypeObject*)__pyx_t_1);
+ if (!(likely(PyType_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "type", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
+ __pyx_v_ndarray = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
}
__Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
@@ -3182,17 +2797,16 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
__Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
goto __pyx_L11_try_end;
__pyx_L4_error:;
- __Pyx_PyThreadState_assign
__Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
+ __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ImportError) || PyErr_ExceptionMatches(__pyx_builtin_AttributeError) || PyErr_ExceptionMatches(__pyx_builtin_TypeError);
if (__pyx_t_7) {
__Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
- if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 119, __pyx_L6_except_error)
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_GOTREF(__pyx_t_8);
__Pyx_GOTREF(__pyx_t_9);
__Pyx_INCREF(Py_None);
- __Pyx_XDECREF_SET(__pyx_v_ndarray, ((PyTypeObject*)Py_None));
+ __Pyx_XDECREF_SET(__pyx_v_ndarray, ((PyObject*)Py_None));
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
@@ -3200,41 +2814,39 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
}
goto __pyx_L6_except_error;
__pyx_L6_except_error:;
- __Pyx_PyThreadState_assign
__Pyx_XGIVEREF(__pyx_t_4);
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
goto __pyx_L1_error;
__pyx_L5_exception_handled:;
- __Pyx_PyThreadState_assign
__Pyx_XGIVEREF(__pyx_t_4);
__Pyx_XGIVEREF(__pyx_t_5);
__Pyx_XGIVEREF(__pyx_t_6);
__Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
__pyx_L11_try_end:;
}
- __pyx_v_itemsize = -1L;
- __pyx_v_long_is_signed = (((long)-1L) < 0);
- __pyx_v_long_long_is_signed = (((PY_LONG_LONG)-1L) < 0);
- __pyx_v_unsigned_short_is_signed = (((unsigned short)-1L) < 0);
- __pyx_v_short_is_signed = (((short)-1L) < 0);
- __pyx_v_int_is_signed = (((int)-1L) < 0);
- __pyx_v_unsigned_long_long_is_signed = (((unsigned PY_LONG_LONG)-1L) < 0);
- __pyx_v_signed_char_is_signed = (((signed char)-1L) < 0);
- __pyx_v_unsigned_long_is_signed = (((unsigned long)-1L) < 0);
- __pyx_v_unsigned_char_is_signed = (((unsigned char)-1L) < 0);
- __pyx_v_unsigned_int_is_signed = (((unsigned int)-1L) < 0);
+ __pyx_v_itemsize = -1;
+ __pyx_v_signed_char_is_signed = (((signed char)-1) < 0);
+ __pyx_v_unsigned_int_is_signed = (((unsigned int)-1) < 0);
+ __pyx_v_signed_int_is_signed = (((signed int)-1) < 0);
+ __pyx_v_unsigned_long_long_is_signed = (((unsigned PY_LONG_LONG)-1) < 0);
+ __pyx_v_unsigned_long_is_signed = (((unsigned long)-1) < 0);
+ __pyx_v_signed_short_is_signed = (((signed short)-1) < 0);
+ __pyx_v_unsigned_short_is_signed = (((unsigned short)-1) < 0);
+ __pyx_v_signed_long_is_signed = (((signed long)-1) < 0);
+ __pyx_v_unsigned_char_is_signed = (((unsigned char)-1) < 0);
+ __pyx_v_signed_long_long_is_signed = (((signed PY_LONG_LONG)-1) < 0);
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_3 = ((0 < __pyx_t_10) != 0);
if (__pyx_t_3) {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_t_9 = PyTuple_GET_ITEM(((PyObject*)__pyx_v_args), 0);
__Pyx_INCREF(__pyx_t_9);
@@ -3244,16 +2856,16 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
}
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_3 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_data, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_3 = (__Pyx_PyDict_Contains(__pyx_n_s_data, ((PyObject*)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
if (unlikely(__pyx_v_kwargs == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_data); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_kwargs), __pyx_n_s_data); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_9);
__pyx_v_arg = __pyx_t_9;
__pyx_t_9 = 0;
@@ -3262,708 +2874,776 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
/*else*/ {
if (unlikely(__pyx_v_args == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
- __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_10 = PyTuple_GET_SIZE(((PyObject*)__pyx_v_args)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Expected_at_least_d_arguments, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_8);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_8);
__pyx_t_8 = 0;
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__pyx_L14:;
- while (1) {
- __pyx_t_2 = (__pyx_v_ndarray != ((PyTypeObject*)Py_None));
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
- __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_dtype = __pyx_t_8;
- __pyx_t_8 = 0;
- goto __pyx_L18;
- }
- __pyx_t_2 = __pyx_memoryview_check(__pyx_v_arg);
+ if (0) {
+ goto __pyx_L15;
+ }
+ /*else*/ {
+ while (1) {
+ if (!1) break;
+ __pyx_t_2 = (__pyx_v_ndarray != ((PyObject*)Py_None));
__pyx_t_3 = (__pyx_t_2 != 0);
if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_v_arg_base = __pyx_t_8;
- __pyx_t_8 = 0;
- __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
+ __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_arg, __pyx_v_ndarray);
__pyx_t_2 = (__pyx_t_3 != 0);
if (__pyx_t_2) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_v_dtype = __pyx_t_8;
__pyx_t_8 = 0;
goto __pyx_L19;
}
+ __pyx_t_2 = (__pyx_memoryview_check(__pyx_v_arg) != 0);
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_base); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_arg_base = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_arg_base, __pyx_v_ndarray);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg_base, __pyx_n_s_dtype); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_v_dtype = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L20;
+ }
+ /*else*/ {
+ __Pyx_INCREF(Py_None);
+ __pyx_v_dtype = Py_None;
+ }
+ __pyx_L20:;
+ goto __pyx_L19;
+ }
/*else*/ {
__Pyx_INCREF(Py_None);
__pyx_v_dtype = Py_None;
}
__pyx_L19:;
- goto __pyx_L18;
- }
- /*else*/ {
- __Pyx_INCREF(Py_None);
- __pyx_v_dtype = Py_None;
- }
- __pyx_L18:;
- __pyx_v_itemsize = -1L;
- __pyx_t_2 = (__pyx_v_dtype != Py_None);
- __pyx_t_3 = (__pyx_t_2 != 0);
- if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_itemsize = __pyx_t_10;
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_11 = __Pyx_PyObject_Ord(__pyx_t_8); if (unlikely(__pyx_t_11 == (long)(Py_UCS4)-1)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_v_kind = __pyx_t_11;
- __pyx_v_dtype_signed = (__pyx_v_kind == 'i');
- switch (__pyx_v_kind) {
- case 'i':
- case 'u':
- __pyx_t_2 = (((sizeof(signed char)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L22_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L22_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_signed_char_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L22_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(short)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L26_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L26_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_short_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L26_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(int)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L30_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L30_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_int_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L30_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(long)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L34_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L34_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L34_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(PY_LONG_LONG)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L38_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L38_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_long_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L38_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(unsigned char)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L42_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L42_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_unsigned_char_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L42_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(unsigned short)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L46_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L46_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_unsigned_short_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L46_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(unsigned int)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L50_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L50_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_unsigned_int_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L50_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(unsigned long)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L54_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_v_itemsize = -1;
+ __pyx_t_3 = (__pyx_v_dtype != Py_None);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_itemsize); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L54_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_unsigned_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L54_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(unsigned PY_LONG_LONG)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L58_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_v_itemsize = __pyx_t_10;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype, __pyx_n_s_kind); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L58_bool_binop_done;
- }
- __pyx_t_2 = ((!((__pyx_v_unsigned_long_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L58_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- break;
- case 'f':
- __pyx_t_2 = (((sizeof(float)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L62_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L62_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
- }
- __pyx_t_2 = (((sizeof(double)) == __pyx_v_itemsize) != 0);
- if (__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L65_bool_binop_done;
- }
- __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ord, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
- __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_11 = __Pyx_PyInt_As_char(__pyx_t_8); if (unlikely((__pyx_t_11 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L65_bool_binop_done:;
- if (__pyx_t_3) {
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_v_kind = __pyx_t_11;
+ __pyx_v_dtype_signed = (__pyx_v_kind == 'i');
+ switch (__pyx_v_kind) {
+ case 'i':
+ case 'u':
+ __pyx_t_3 = (((sizeof(signed char)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L23_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L23_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_signed_char_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L23_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(signed short)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L27_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L27_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_signed_short_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L27_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(signed int)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L31_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L31_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_signed_int_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L31_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(signed long)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L35_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L35_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_signed_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L35_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(signed PY_LONG_LONG)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L39_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L39_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_signed_long_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L39_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(unsigned char)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L43_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L43_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_unsigned_char_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L43_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(unsigned short)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L47_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L47_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_unsigned_short_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L47_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(unsigned int)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L51_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L51_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_unsigned_int_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L51_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(unsigned long)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L55_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L55_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_unsigned_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L55_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(unsigned PY_LONG_LONG)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L59_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L59_bool_binop_done;
+ }
+ __pyx_t_3 = ((!((__pyx_v_unsigned_long_long_is_signed ^ __pyx_v_dtype_signed) != 0)) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L59_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ break;
+ case 'f':
+ __pyx_t_3 = (((sizeof(float)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L63_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L63_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(double)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L66_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L66_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ __pyx_t_3 = (((sizeof(long double)) == __pyx_v_itemsize) != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L69_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_ndim); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((((Py_ssize_t)__pyx_t_10) == 1) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L69_bool_binop_done:;
+ if (__pyx_t_2) {
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_long_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ break;
+ case 'c':
+ break;
+ case 'O':
+ break;
+ default: break;
}
- break;
- case 'c':
- break;
- case 'O':
- break;
- default: break;
+ goto __pyx_L21;
}
+ __pyx_L21:;
+ goto __pyx_L18;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L68_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(float))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L68_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L18:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L72_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(float))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L72_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_float(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_float, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L71;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L72_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(double))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L72_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L71:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L76_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(double))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L76_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_double(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L75;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L76_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(signed char))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L76_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_signed__char(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L75:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L80_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(long double))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L80_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_long_double(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_long_double, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L79;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L80_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(short))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L80_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_short(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L79:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L84_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(signed char))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L84_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_char(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L83;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L84_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(int))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L84_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L83:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L88_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(signed short))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L88_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_short(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L87;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L88_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(long))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L88_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_long(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_n_s_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L87:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L92_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(signed int))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L92_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_int(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L91;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L92_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(PY_LONG_LONG))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L92_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_PY_LONG_LONG(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L91:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L96_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(signed long))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L96_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_long(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L95;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L96_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned char))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L96_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L95:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L100_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(signed PY_LONG_LONG))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L100_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_PY_LONG_LONG(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_signed_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L99;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L100_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned short))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L100_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_short(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L99:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L104_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(unsigned char))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L104_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_char, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L103;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L104_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned int))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L104_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_int(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L103:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L108_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(unsigned short))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L108_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_short(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_short, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L107;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L108_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned long))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L108_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_long(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L107:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L112_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(unsigned int))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L112_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_int(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_int, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L111;
}
- }
- __pyx_t_2 = ((__pyx_v_itemsize == -1L) != 0);
- if (!__pyx_t_2) {
- } else {
- __pyx_t_3 = __pyx_t_2;
- goto __pyx_L112_bool_binop_done;
- }
- __pyx_t_2 = ((__pyx_v_itemsize == (sizeof(unsigned PY_LONG_LONG))) != 0);
- __pyx_t_3 = __pyx_t_2;
- __pyx_L112_bool_binop_done:;
- if (__pyx_t_3) {
- __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_PY_LONG_LONG(__pyx_v_arg);
- __pyx_v_memslice = __pyx_t_12;
- __pyx_t_3 = (__pyx_v_memslice.memview != 0);
- if (__pyx_t_3) {
- __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L111:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L116_bool_binop_done;
}
- /*else*/ {
- PyErr_Clear();
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(unsigned long))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L116_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_long(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L115;
}
+ __pyx_L115:;
+ __pyx_t_3 = ((__pyx_v_itemsize == -1) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L120_bool_binop_done;
+ }
+ __pyx_t_3 = ((__pyx_v_itemsize == (sizeof(unsigned PY_LONG_LONG))) != 0);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_L120_bool_binop_done:;
+ if (__pyx_t_2) {
+ __pyx_v_memslice = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_PY_LONG_LONG(__pyx_v_arg);
+ __pyx_t_2 = (__pyx_v_memslice.memview != 0);
+ if (__pyx_t_2) {
+ __PYX_XDEC_MEMVIEW((&__pyx_v_memslice), 1);
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, __pyx_kp_s_unsigned_long_long, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
+ }
+ /*else*/ {
+ PyErr_Clear();
+ }
+ goto __pyx_L119;
+ }
+ __pyx_L119:;
+ if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L17_break;
}
- if (unlikely(__Pyx_SetItemInt(__pyx_v_dest_sig, 0, Py_None, long, 1, __Pyx_PyInt_From_long, 1, 0, 0) < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
- goto __pyx_L16_break;
+ __pyx_L17_break:;
}
- __pyx_L16_break:;
- __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_L15:;
+ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__pyx_v_candidates = ((PyObject*)__pyx_t_8);
__pyx_t_8 = 0;
__pyx_t_10 = 0;
if (unlikely(__pyx_v_signatures == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_9 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_13), (&__pyx_t_7)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_dict_iterator(((PyObject*)__pyx_v_signatures), 1, ((PyObject *)NULL), (&__pyx_t_12), (&__pyx_t_7)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_XDECREF(__pyx_t_8);
__pyx_t_8 = __pyx_t_9;
__pyx_t_9 = 0;
while (1) {
- __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_13, &__pyx_t_10, &__pyx_t_9, NULL, NULL, __pyx_t_7);
- if (unlikely(__pyx_t_14 == 0)) break;
- if (unlikely(__pyx_t_14 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_12, &__pyx_t_10, &__pyx_t_9, NULL, NULL, __pyx_t_7);
+ if (unlikely(__pyx_t_13 == 0)) break;
+ if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_XDECREF_SET(__pyx_v_sig, __pyx_t_9);
__pyx_t_9 = 0;
__pyx_v_match_found = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_sig, __pyx_n_s_strip); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__Pyx_INCREF(__pyx_v_dest_sig);
- __Pyx_GIVEREF(__pyx_v_dest_sig);
PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_dest_sig);
+ __Pyx_GIVEREF(__pyx_v_dest_sig);
__pyx_t_1 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
- __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_15 = 0;
- __pyx_t_16 = NULL;
+ __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_14 = 0;
+ __pyx_t_15 = NULL;
} else {
- __pyx_t_15 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_14 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_9);
- __pyx_t_16 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_15 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
for (;;) {
- if (likely(!__pyx_t_16)) {
+ if (likely(!__pyx_t_15)) {
if (likely(PyList_CheckExact(__pyx_t_9))) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_9)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
- __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_COMPILING_IN_CPYTHON
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_14); __Pyx_INCREF(__pyx_t_1); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
}
} else {
- __pyx_t_1 = __pyx_t_16(__pyx_t_9);
+ __pyx_t_1 = __pyx_t_15(__pyx_t_9);
if (unlikely(!__pyx_t_1)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else __PYX_ERR(0, 119, __pyx_L1_error)
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
@@ -3971,7 +3651,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
}
if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
PyObject* sequence = __pyx_t_1;
- #if !CYTHON_COMPILING_IN_PYPY
+ #if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
Py_ssize_t size = PySequence_Size(sequence);
@@ -3979,100 +3659,104 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
if (unlikely(size != 2)) {
if (size > 2) __Pyx_RaiseTooManyValuesError(2);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ #if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_17 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_16 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_17 = PyTuple_GET_ITEM(sequence, 1);
} else {
- __pyx_t_17 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_18 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_16 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_17 = PyList_GET_ITEM(sequence, 1);
}
+ __Pyx_INCREF(__pyx_t_16);
__Pyx_INCREF(__pyx_t_17);
- __Pyx_INCREF(__pyx_t_18);
#else
- __pyx_t_17 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_16 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
#endif
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
} else {
Py_ssize_t index = -1;
- __pyx_t_19 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 119, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_19);
+ __pyx_t_18 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_18);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext;
- index = 0; __pyx_t_17 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_17)) goto __pyx_L119_unpacking_failed;
+ __pyx_t_19 = Py_TYPE(__pyx_t_18)->tp_iternext;
+ index = 0; __pyx_t_16 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_16)) goto __pyx_L127_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_16);
+ index = 1; __pyx_t_17 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_17)) goto __pyx_L127_unpacking_failed;
__Pyx_GOTREF(__pyx_t_17);
- index = 1; __pyx_t_18 = __pyx_t_20(__pyx_t_19); if (unlikely(!__pyx_t_18)) goto __pyx_L119_unpacking_failed;
- __Pyx_GOTREF(__pyx_t_18);
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 2) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
- __pyx_t_20 = NULL;
- __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- goto __pyx_L120_unpacking_done;
- __pyx_L119_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- __pyx_t_20 = NULL;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_19 = NULL;
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ goto __pyx_L128_unpacking_done;
+ __pyx_L127_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __pyx_t_19 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- __PYX_ERR(0, 119, __pyx_L1_error)
- __pyx_L120_unpacking_done:;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_L128_unpacking_done:;
}
- __Pyx_XDECREF_SET(__pyx_v_src_type, __pyx_t_17);
+ __Pyx_XDECREF_SET(__pyx_v_src_type, __pyx_t_16);
+ __pyx_t_16 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_17);
__pyx_t_17 = 0;
- __Pyx_XDECREF_SET(__pyx_v_dst_type, __pyx_t_18);
- __pyx_t_18 = 0;
- __pyx_t_3 = (__pyx_v_dst_type != Py_None);
- __pyx_t_2 = (__pyx_t_3 != 0);
- if (__pyx_t_2) {
- __pyx_t_1 = PyObject_RichCompare(__pyx_v_src_type, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
- __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = (__pyx_v_dst_type != Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_src_type, __pyx_v_dst_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- if (__pyx_t_2) {
+ if (__pyx_t_3) {
__pyx_v_match_found = 1;
- goto __pyx_L122;
+ goto __pyx_L130;
}
/*else*/ {
__pyx_v_match_found = 0;
- goto __pyx_L118_break;
+ goto __pyx_L126_break;
}
- __pyx_L122:;
+ __pyx_L130:;
+ goto __pyx_L129;
}
+ __pyx_L129:;
}
- __pyx_L118_break:;
+ __pyx_L126_break:;
__Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
- __pyx_t_2 = (__pyx_v_match_found != 0);
- if (__pyx_t_2) {
- __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_21 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_3 = (__pyx_v_match_found != 0);
+ if (__pyx_t_3) {
+ __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_candidates, __pyx_v_sig); if (unlikely(__pyx_t_20 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ goto __pyx_L131;
}
+ __pyx_L131:;
}
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __pyx_t_2 = (__pyx_v_candidates != Py_None) && (PyList_GET_SIZE(__pyx_v_candidates) != 0);
- __pyx_t_3 = ((!__pyx_t_2) != 0);
- if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_3 = (__pyx_v_candidates != Py_None) && (PyList_GET_SIZE(__pyx_v_candidates) != 0);
+ __pyx_t_2 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_13 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 119, __pyx_L1_error)
- __pyx_t_3 = ((__pyx_t_13 > 1) != 0);
- if (__pyx_t_3) {
- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_12 = PyList_GET_SIZE(__pyx_v_candidates); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_2 = ((__pyx_t_12 > 1) != 0);
+ if (__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_8);
__Pyx_Raise(__pyx_t_8, 0, 0, 0);
__Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
/*else*/ {
__Pyx_XDECREF(__pyx_r);
if (unlikely(__pyx_v_signatures == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
- __PYX_ERR(0, 119, __pyx_L1_error)
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyDict_GetItem(((PyObject*)__pyx_v_signatures), PyList_GET_ITEM(__pyx_v_candidates, 0)); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_8);
__pyx_r = __pyx_t_8;
__pyx_t_8 = 0;
@@ -4084,9 +3768,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
__Pyx_XDECREF(__pyx_t_1);
__Pyx_XDECREF(__pyx_t_8);
__Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
__Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_19);
__Pyx_AddTraceback("silx.math.combo.__pyx_fused_cpdef", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -4106,27 +3790,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo__min_max(CYTHON_UNUSED PyObject *__
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_62__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_68__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -4150,13 +3837,16 @@ static PyMethodDef __pyx_fuse_0__pyx_mdef_4silx_4math_5combo_7_min_max = {"__pyx
static PyObject *__pyx_fuse_0__pyx_pw_4silx_4math_5combo_7_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults12 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults12, __pyx_self);
+ __pyx_defaults13 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -4178,7 +3868,7 @@ static PyObject *__pyx_fuse_0__pyx_pw_4silx_4math_5combo_7_min_max(PyObject *__p
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -4188,16 +3878,16 @@ static PyObject *__pyx_fuse_0__pyx_pw_4silx_4math_5combo_7_min_max(PyObject *__p
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_float(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_float(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -4213,26 +3903,26 @@ static PyObject *__pyx_fuse_0__pyx_pw_4silx_4math_5combo_7_min_max(PyObject *__p
static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
float __pyx_v_value;
float __pyx_v_minimum;
+ float __pyx_v_min_pos;
float __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- double __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
- size_t __pyx_t_11;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ unsigned int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
PyObject *__pyx_t_14 = NULL;
@@ -4240,13 +3930,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
PyObject *__pyx_t_18 = NULL;
- PyObject *__pyx_t_19 = NULL;
- int __pyx_t_20;
- PyObject *__pyx_t_21 = NULL;
+ Py_ssize_t __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_0_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -4254,7 +3946,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -4263,7 +3955,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -4272,7 +3964,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -4281,20 +3973,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_float, (int (*)(char *, PyObject *)) __pyx_memview_set_float, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -4304,29 +3996,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -4340,17 +4024,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -4359,7 +4043,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -4368,25 +4052,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* else:
*/
- __pyx_t_5 = (__pyx_v_min_positive != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_4) {
} else {
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_3 = __pyx_t_4;
goto __pyx_L8_bool_binop_done;
}
- __pyx_t_5 = ((__pyx_v_value > 0.0) != 0);
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_4 = ((__pyx_v_value > 0.0) != 0);
+ __pyx_t_3 = __pyx_t_4;
__pyx_L8_bool_binop_done:;
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":143
+ /* "silx/math/combo.pyx":152
* maximum = value
* if min_positive and value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -4394,51 +4078,43 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* min_pos = 0
*/
__pyx_v_min_pos = __pyx_v_value;
-
- /* "silx/math/combo.pyx":142
- * minimum = value
- * maximum = value
- * if min_positive and value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * else:
- */
goto __pyx_L7;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":145
+ /* "silx/math/combo.pyx":154
* min_pos = value
* else:
* min_pos = 0 # <<<<<<<<<<<<<<
*
- * if _number in cython.floating:
+ * if _number in _floating:
*/
- /*else*/ {
__pyx_v_min_pos = 0.0;
}
__pyx_L7:;
- /* "silx/math/combo.pyx":149
- * if _number in cython.floating:
+ /* "silx/math/combo.pyx":158
+ * if _number in _floating:
* # For floating, loop until first not NaN value
* for index in range(length): # <<<<<<<<<<<<<<
* value = data[index]
* if not isnan(value):
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":150
+ /* "silx/math/combo.pyx":159
* # For floating, loop until first not NaN value
* for index in range(length):
* value = data[index] # <<<<<<<<<<<<<<
* if not isnan(value):
* minimum = value
*/
- __pyx_t_8 = __pyx_v_index;
- __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_8)) )));
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_7)) )));
- /* "silx/math/combo.pyx":151
+ /* "silx/math/combo.pyx":160
* for index in range(length):
* value = data[index]
* if not isnan(value): # <<<<<<<<<<<<<<
@@ -4448,7 +4124,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((!(isnan(__pyx_v_value) != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":152
+ /* "silx/math/combo.pyx":161
* value = data[index]
* if not isnan(value):
* minimum = value # <<<<<<<<<<<<<<
@@ -4457,7 +4133,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":153
+ /* "silx/math/combo.pyx":162
* if not isnan(value):
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -4466,7 +4142,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_index = __pyx_v_index;
- /* "silx/math/combo.pyx":154
+ /* "silx/math/combo.pyx":163
* minimum = value
* min_index = index
* maximum = value # <<<<<<<<<<<<<<
@@ -4475,7 +4151,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":155
+ /* "silx/math/combo.pyx":164
* min_index = index
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -4484,7 +4160,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_max_index = __pyx_v_index;
- /* "silx/math/combo.pyx":156
+ /* "silx/math/combo.pyx":165
* maximum = value
* max_index = index
* break # <<<<<<<<<<<<<<
@@ -4492,19 +4168,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* if not min_positive:
*/
goto __pyx_L11_break;
-
- /* "silx/math/combo.pyx":151
- * for index in range(length):
- * value = data[index]
- * if not isnan(value): # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
}
}
__pyx_L11_break:;
- /* "silx/math/combo.pyx":158
+ /* "silx/math/combo.pyx":167
* break
*
* if not min_positive: # <<<<<<<<<<<<<<
@@ -4514,28 +4182,28 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":159
+ /* "silx/math/combo.pyx":168
*
* if not min_positive:
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":160
+ /* "silx/math/combo.pyx":169
* if not min_positive:
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_9 = __pyx_v_index;
- __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_9)) )));
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_8)) )));
- /* "silx/math/combo.pyx":161
+ /* "silx/math/combo.pyx":170
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -4545,7 +4213,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":162
+ /* "silx/math/combo.pyx":171
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -4554,7 +4222,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":163
+ /* "silx/math/combo.pyx":172
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -4562,18 +4230,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":161
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L16;
}
- /* "silx/math/combo.pyx":164
+ /* "silx/math/combo.pyx":173
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -4583,7 +4243,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":165
+ /* "silx/math/combo.pyx":174
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -4592,7 +4252,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":166
+ /* "silx/math/combo.pyx":175
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -4600,51 +4260,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* else:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":164
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L16;
}
__pyx_L16:;
}
-
- /* "silx/math/combo.pyx":158
- * break
- *
- * if not min_positive: # <<<<<<<<<<<<<<
- * for index in range(index, length):
- * value = data[index]
- */
goto __pyx_L13;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":170
+ /* "silx/math/combo.pyx":179
* else:
* # Loop until min_pos is defined
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- /*else*/ {
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":171
+ /* "silx/math/combo.pyx":180
* # Loop until min_pos is defined
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_10 = __pyx_v_index;
- __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_10)) )));
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_9)) )));
- /* "silx/math/combo.pyx":172
+ /* "silx/math/combo.pyx":181
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -4654,7 +4299,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":173
+ /* "silx/math/combo.pyx":182
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -4663,7 +4308,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":174
+ /* "silx/math/combo.pyx":183
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -4671,18 +4316,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":172
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L19;
}
- /* "silx/math/combo.pyx":175
+ /* "silx/math/combo.pyx":184
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -4692,7 +4329,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":176
+ /* "silx/math/combo.pyx":185
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -4701,7 +4338,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":177
+ /* "silx/math/combo.pyx":186
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -4709,18 +4346,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* if value > 0:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":175
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L19;
}
__pyx_L19:;
- /* "silx/math/combo.pyx":179
+ /* "silx/math/combo.pyx":188
* min_index = index
*
* if value > 0: # <<<<<<<<<<<<<<
@@ -4730,7 +4360,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value > 0.0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":180
+ /* "silx/math/combo.pyx":189
*
* if value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -4739,7 +4369,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":181
+ /* "silx/math/combo.pyx":190
* if value > 0:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -4748,7 +4378,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_pos_index = __pyx_v_index;
- /* "silx/math/combo.pyx":182
+ /* "silx/math/combo.pyx":191
* min_pos = value
* min_pos_index = index
* break # <<<<<<<<<<<<<<
@@ -4756,41 +4386,33 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* # Loop until the end
*/
goto __pyx_L18_break;
-
- /* "silx/math/combo.pyx":179
- * min_index = index
- *
- * if value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
}
}
__pyx_L18_break:;
- /* "silx/math/combo.pyx":185
+ /* "silx/math/combo.pyx":194
*
* # Loop until the end
- * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * for index in range(index + 1, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = (__pyx_v_index + 1); __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":186
+ /* "silx/math/combo.pyx":195
* # Loop until the end
- * for index in range(index+1, length):
+ * for index in range(index + 1, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_11 = __pyx_v_index;
- __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_11)) )));
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((float *) ( /* dim=0 */ ((char *) (((float *) __pyx_v_data.data) + __pyx_t_10)) )));
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
+ /* "silx/math/combo.pyx":196
+ * for index in range(index + 1, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
* maximum = value
@@ -4799,7 +4421,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":188
+ /* "silx/math/combo.pyx":197
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -4808,7 +4430,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":189
+ /* "silx/math/combo.pyx":198
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -4816,29 +4438,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* if value < minimum:
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L23;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":191
+ /* "silx/math/combo.pyx":200
* max_index = index
* else:
* if value < minimum: # <<<<<<<<<<<<<<
* minimum = value
* min_index = index
*/
- /*else*/ {
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":192
+ /* "silx/math/combo.pyx":201
* else:
* if value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -4847,7 +4461,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":193
+ /* "silx/math/combo.pyx":202
* if value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -4855,17 +4469,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* if 0 < value < min_pos:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":191
- * max_index = index
- * else:
- * if value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L24;
}
+ __pyx_L24:;
- /* "silx/math/combo.pyx":195
+ /* "silx/math/combo.pyx":204
* min_index = index
*
* if 0 < value < min_pos: # <<<<<<<<<<<<<<
@@ -4876,10 +4484,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
if (__pyx_t_3) {
__pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
}
- __pyx_t_5 = (__pyx_t_3 != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
- /* "silx/math/combo.pyx":196
+ /* "silx/math/combo.pyx":205
*
* if 0 < value < min_pos:
* min_pos = value # <<<<<<<<<<<<<<
@@ -4888,7 +4496,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":197
+ /* "silx/math/combo.pyx":206
* if 0 < value < min_pos:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -4896,15 +4504,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* return _MinMaxResult(minimum,
*/
__pyx_v_min_pos_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":195
- * min_index = index
- *
- * if 0 < value < min_pos: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L25;
}
+ __pyx_L25:;
}
__pyx_L23:;
}
@@ -4912,7 +4514,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__pyx_L13:;
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -4930,7 +4532,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
}
}
- /* "silx/math/combo.pyx":199
+ /* "silx/math/combo.pyx":208
* min_pos_index = index
*
* return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
@@ -4938,12 +4540,12 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* maximum,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_13 = PyFloat_FromDouble(__pyx_v_minimum); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_13);
- /* "silx/math/combo.pyx":200
+ /* "silx/math/combo.pyx":209
*
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -4951,36 +4553,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
* min_index,
*/
if (((__pyx_v_min_pos > 0.0) != 0)) {
- __pyx_t_15 = PyFloat_FromDouble(__pyx_v_min_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 200, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_14 = __pyx_t_15;
- __pyx_t_15 = 0;
+ __pyx_t_14 = PyFloat_FromDouble(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_14 = Py_None;
+ __pyx_t_13 = Py_None;
}
- /* "silx/math/combo.pyx":201
+ /* "silx/math/combo.pyx":210
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None,
* maximum, # <<<<<<<<<<<<<<
* min_index,
* min_pos_index if min_pos > 0 else None,
*/
- __pyx_t_15 = PyFloat_FromDouble(__pyx_v_maximum); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = PyFloat_FromDouble(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
- /* "silx/math/combo.pyx":202
+ /* "silx/math/combo.pyx":211
* min_pos if min_pos > 0 else None,
* maximum,
* min_index, # <<<<<<<<<<<<<<
* min_pos_index if min_pos > 0 else None,
* max_index)
*/
- __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 202, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
- /* "silx/math/combo.pyx":203
+ /* "silx/math/combo.pyx":212
* maximum,
* min_index,
* min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -4988,98 +4590,68 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
*
*/
if (((__pyx_v_min_pos > 0.0) != 0)) {
- __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_17 = __pyx_t_18;
- __pyx_t_18 = 0;
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_17 = Py_None;
+ __pyx_t_16 = Py_None;
}
- /* "silx/math/combo.pyx":204
+ /* "silx/math/combo.pyx":213
* min_index,
* min_pos_index if min_pos > 0 else None,
* max_index) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 204, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_19 = NULL;
- __pyx_t_20 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
- __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_12);
- if (likely(__pyx_t_19)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
- __Pyx_INCREF(__pyx_t_19);
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_12, function);
- __pyx_t_20 = 1;
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
}
}
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_12)) {
- PyObject *__pyx_temp[7] = {__pyx_t_19, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 6+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
- PyObject *__pyx_temp[7] = {__pyx_t_19, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 6+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- } else
- #endif
- {
- __pyx_t_21 = PyTuple_New(6+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_21);
- if (__pyx_t_19) {
- __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_19); __pyx_t_19 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_20, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_20, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_16);
- PyTuple_SET_ITEM(__pyx_t_21, 3+__pyx_t_20, __pyx_t_16);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_21, 4+__pyx_t_20, __pyx_t_17);
- __Pyx_GIVEREF(__pyx_t_18);
- PyTuple_SET_ITEM(__pyx_t_21, 5+__pyx_t_20, __pyx_t_18);
- __pyx_t_13 = 0;
- __pyx_t_14 = 0;
- __pyx_t_15 = 0;
- __pyx_t_16 = 0;
- __pyx_t_17 = 0;
- __pyx_t_18 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- }
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "silx/math/combo.pyx":119
+ /* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -5090,6 +4662,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_14);
@@ -5097,8 +4670,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
__Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_19);
- __Pyx_XDECREF(__pyx_t_21);
+ __Pyx_XDECREF(__pyx_t_20);
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -5108,27 +4680,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo_6_min_max(CYTHON_UNUSED PyObject *_
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_64__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_70__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -5152,13 +4727,16 @@ static PyMethodDef __pyx_fuse_1__pyx_mdef_4silx_4math_5combo_9_min_max = {"__pyx
static PyObject *__pyx_fuse_1__pyx_pw_4silx_4math_5combo_9_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults13 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults13, __pyx_self);
+ __pyx_defaults14 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -5180,7 +4758,7 @@ static PyObject *__pyx_fuse_1__pyx_pw_4silx_4math_5combo_9_min_max(PyObject *__p
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -5190,16 +4768,16 @@ static PyObject *__pyx_fuse_1__pyx_pw_4silx_4math_5combo_9_min_max(PyObject *__p
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_double(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_double(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -5215,26 +4793,26 @@ static PyObject *__pyx_fuse_1__pyx_pw_4silx_4math_5combo_9_min_max(PyObject *__p
static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
double __pyx_v_value;
double __pyx_v_minimum;
+ double __pyx_v_min_pos;
double __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- double __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
- size_t __pyx_t_11;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ unsigned int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
PyObject *__pyx_t_14 = NULL;
@@ -5242,13 +4820,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
PyObject *__pyx_t_18 = NULL;
- PyObject *__pyx_t_19 = NULL;
- int __pyx_t_20;
- PyObject *__pyx_t_21 = NULL;
+ Py_ssize_t __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_1_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -5256,7 +4836,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -5265,7 +4845,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -5274,7 +4854,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -5283,20 +4863,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -5306,29 +4886,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -5342,17 +4914,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -5361,7 +4933,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -5370,25 +4942,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* else:
*/
- __pyx_t_5 = (__pyx_v_min_positive != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_4) {
} else {
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_3 = __pyx_t_4;
goto __pyx_L8_bool_binop_done;
}
- __pyx_t_5 = ((__pyx_v_value > 0.0) != 0);
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_4 = ((__pyx_v_value > 0.0) != 0);
+ __pyx_t_3 = __pyx_t_4;
__pyx_L8_bool_binop_done:;
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":143
+ /* "silx/math/combo.pyx":152
* maximum = value
* if min_positive and value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -5396,51 +4968,43 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* min_pos = 0
*/
__pyx_v_min_pos = __pyx_v_value;
-
- /* "silx/math/combo.pyx":142
- * minimum = value
- * maximum = value
- * if min_positive and value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * else:
- */
goto __pyx_L7;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":145
+ /* "silx/math/combo.pyx":154
* min_pos = value
* else:
* min_pos = 0 # <<<<<<<<<<<<<<
*
- * if _number in cython.floating:
+ * if _number in _floating:
*/
- /*else*/ {
__pyx_v_min_pos = 0.0;
}
__pyx_L7:;
- /* "silx/math/combo.pyx":149
- * if _number in cython.floating:
+ /* "silx/math/combo.pyx":158
+ * if _number in _floating:
* # For floating, loop until first not NaN value
* for index in range(length): # <<<<<<<<<<<<<<
* value = data[index]
* if not isnan(value):
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":150
+ /* "silx/math/combo.pyx":159
* # For floating, loop until first not NaN value
* for index in range(length):
* value = data[index] # <<<<<<<<<<<<<<
* if not isnan(value):
* minimum = value
*/
- __pyx_t_8 = __pyx_v_index;
- __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_8)) )));
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_7)) )));
- /* "silx/math/combo.pyx":151
+ /* "silx/math/combo.pyx":160
* for index in range(length):
* value = data[index]
* if not isnan(value): # <<<<<<<<<<<<<<
@@ -5450,7 +5014,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((!(isnan(__pyx_v_value) != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":152
+ /* "silx/math/combo.pyx":161
* value = data[index]
* if not isnan(value):
* minimum = value # <<<<<<<<<<<<<<
@@ -5459,7 +5023,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":153
+ /* "silx/math/combo.pyx":162
* if not isnan(value):
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -5468,7 +5032,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_index = __pyx_v_index;
- /* "silx/math/combo.pyx":154
+ /* "silx/math/combo.pyx":163
* minimum = value
* min_index = index
* maximum = value # <<<<<<<<<<<<<<
@@ -5477,7 +5041,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":155
+ /* "silx/math/combo.pyx":164
* min_index = index
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -5486,7 +5050,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_max_index = __pyx_v_index;
- /* "silx/math/combo.pyx":156
+ /* "silx/math/combo.pyx":165
* maximum = value
* max_index = index
* break # <<<<<<<<<<<<<<
@@ -5494,19 +5058,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* if not min_positive:
*/
goto __pyx_L11_break;
-
- /* "silx/math/combo.pyx":151
- * for index in range(length):
- * value = data[index]
- * if not isnan(value): # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
}
}
__pyx_L11_break:;
- /* "silx/math/combo.pyx":158
+ /* "silx/math/combo.pyx":167
* break
*
* if not min_positive: # <<<<<<<<<<<<<<
@@ -5516,28 +5072,28 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":159
+ /* "silx/math/combo.pyx":168
*
* if not min_positive:
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":160
+ /* "silx/math/combo.pyx":169
* if not min_positive:
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_9 = __pyx_v_index;
- __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_9)) )));
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_8)) )));
- /* "silx/math/combo.pyx":161
+ /* "silx/math/combo.pyx":170
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -5547,7 +5103,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":162
+ /* "silx/math/combo.pyx":171
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -5556,7 +5112,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":163
+ /* "silx/math/combo.pyx":172
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -5564,18 +5120,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":161
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L16;
}
- /* "silx/math/combo.pyx":164
+ /* "silx/math/combo.pyx":173
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -5585,7 +5133,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":165
+ /* "silx/math/combo.pyx":174
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -5594,7 +5142,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":166
+ /* "silx/math/combo.pyx":175
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -5602,51 +5150,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* else:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":164
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L16;
}
__pyx_L16:;
}
-
- /* "silx/math/combo.pyx":158
- * break
- *
- * if not min_positive: # <<<<<<<<<<<<<<
- * for index in range(index, length):
- * value = data[index]
- */
goto __pyx_L13;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":170
+ /* "silx/math/combo.pyx":179
* else:
* # Loop until min_pos is defined
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- /*else*/ {
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":171
+ /* "silx/math/combo.pyx":180
* # Loop until min_pos is defined
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_10 = __pyx_v_index;
- __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_10)) )));
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_9)) )));
- /* "silx/math/combo.pyx":172
+ /* "silx/math/combo.pyx":181
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -5656,7 +5189,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":173
+ /* "silx/math/combo.pyx":182
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -5665,7 +5198,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":174
+ /* "silx/math/combo.pyx":183
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -5673,18 +5206,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":172
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L19;
}
- /* "silx/math/combo.pyx":175
+ /* "silx/math/combo.pyx":184
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -5694,7 +5219,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":176
+ /* "silx/math/combo.pyx":185
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -5703,7 +5228,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":177
+ /* "silx/math/combo.pyx":186
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -5711,18 +5236,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* if value > 0:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":175
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L19;
}
__pyx_L19:;
- /* "silx/math/combo.pyx":179
+ /* "silx/math/combo.pyx":188
* min_index = index
*
* if value > 0: # <<<<<<<<<<<<<<
@@ -5732,7 +5250,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value > 0.0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":180
+ /* "silx/math/combo.pyx":189
*
* if value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -5741,7 +5259,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":181
+ /* "silx/math/combo.pyx":190
* if value > 0:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -5750,7 +5268,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_pos_index = __pyx_v_index;
- /* "silx/math/combo.pyx":182
+ /* "silx/math/combo.pyx":191
* min_pos = value
* min_pos_index = index
* break # <<<<<<<<<<<<<<
@@ -5758,41 +5276,33 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* # Loop until the end
*/
goto __pyx_L18_break;
-
- /* "silx/math/combo.pyx":179
- * min_index = index
- *
- * if value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
}
}
__pyx_L18_break:;
- /* "silx/math/combo.pyx":185
+ /* "silx/math/combo.pyx":194
*
* # Loop until the end
- * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * for index in range(index + 1, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = (__pyx_v_index + 1); __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":186
+ /* "silx/math/combo.pyx":195
* # Loop until the end
- * for index in range(index+1, length):
+ * for index in range(index + 1, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_11 = __pyx_v_index;
- __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_11)) )));
+ __pyx_t_10 = __pyx_v_index;
+ __pyx_v_value = (*((double *) ( /* dim=0 */ ((char *) (((double *) __pyx_v_data.data) + __pyx_t_10)) )));
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
+ /* "silx/math/combo.pyx":196
+ * for index in range(index + 1, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
* maximum = value
@@ -5801,7 +5311,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":188
+ /* "silx/math/combo.pyx":197
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -5810,7 +5320,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":189
+ /* "silx/math/combo.pyx":198
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -5818,29 +5328,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* if value < minimum:
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L23;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":191
+ /* "silx/math/combo.pyx":200
* max_index = index
* else:
* if value < minimum: # <<<<<<<<<<<<<<
* minimum = value
* min_index = index
*/
- /*else*/ {
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":192
+ /* "silx/math/combo.pyx":201
* else:
* if value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -5849,7 +5351,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":193
+ /* "silx/math/combo.pyx":202
* if value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -5857,17 +5359,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* if 0 < value < min_pos:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":191
- * max_index = index
- * else:
- * if value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L24;
}
+ __pyx_L24:;
- /* "silx/math/combo.pyx":195
+ /* "silx/math/combo.pyx":204
* min_index = index
*
* if 0 < value < min_pos: # <<<<<<<<<<<<<<
@@ -5878,10 +5374,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
if (__pyx_t_3) {
__pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
}
- __pyx_t_5 = (__pyx_t_3 != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
- /* "silx/math/combo.pyx":196
+ /* "silx/math/combo.pyx":205
*
* if 0 < value < min_pos:
* min_pos = value # <<<<<<<<<<<<<<
@@ -5890,7 +5386,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":197
+ /* "silx/math/combo.pyx":206
* if 0 < value < min_pos:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -5898,15 +5394,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* return _MinMaxResult(minimum,
*/
__pyx_v_min_pos_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":195
- * min_index = index
- *
- * if 0 < value < min_pos: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L25;
}
+ __pyx_L25:;
}
__pyx_L23:;
}
@@ -5914,7 +5404,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__pyx_L13:;
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -5932,7 +5422,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
}
}
- /* "silx/math/combo.pyx":199
+ /* "silx/math/combo.pyx":208
* min_pos_index = index
*
* return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
@@ -5940,12 +5430,12 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* maximum,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- __pyx_t_13 = PyFloat_FromDouble(__pyx_v_minimum); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_13);
- /* "silx/math/combo.pyx":200
+ /* "silx/math/combo.pyx":209
*
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -5953,36 +5443,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
* min_index,
*/
if (((__pyx_v_min_pos > 0.0) != 0)) {
- __pyx_t_15 = PyFloat_FromDouble(__pyx_v_min_pos); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 200, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
- __pyx_t_14 = __pyx_t_15;
- __pyx_t_15 = 0;
+ __pyx_t_14 = PyFloat_FromDouble(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __pyx_t_14;
+ __pyx_t_14 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_14 = Py_None;
+ __pyx_t_13 = Py_None;
}
- /* "silx/math/combo.pyx":201
+ /* "silx/math/combo.pyx":210
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None,
* maximum, # <<<<<<<<<<<<<<
* min_index,
* min_pos_index if min_pos > 0 else None,
*/
- __pyx_t_15 = PyFloat_FromDouble(__pyx_v_maximum); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = PyFloat_FromDouble(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
- /* "silx/math/combo.pyx":202
+ /* "silx/math/combo.pyx":211
* min_pos if min_pos > 0 else None,
* maximum,
* min_index, # <<<<<<<<<<<<<<
* min_pos_index if min_pos > 0 else None,
* max_index)
*/
- __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 202, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
- /* "silx/math/combo.pyx":203
+ /* "silx/math/combo.pyx":212
* maximum,
* min_index,
* min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -5990,98 +5480,68 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
*
*/
if (((__pyx_v_min_pos > 0.0) != 0)) {
- __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_17 = __pyx_t_18;
- __pyx_t_18 = 0;
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_16 = __pyx_t_17;
+ __pyx_t_17 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_17 = Py_None;
+ __pyx_t_16 = Py_None;
}
- /* "silx/math/combo.pyx":204
+ /* "silx/math/combo.pyx":213
* min_index,
* min_pos_index if min_pos > 0 else None,
* max_index) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_18 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 204, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_18);
- __pyx_t_19 = NULL;
- __pyx_t_20 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
- __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_12);
- if (likely(__pyx_t_19)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
- __Pyx_INCREF(__pyx_t_19);
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = NULL;
+ __pyx_t_19 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_18);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_12, function);
- __pyx_t_20 = 1;
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_19 = 1;
}
}
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_12)) {
- PyObject *__pyx_temp[7] = {__pyx_t_19, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 6+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
- PyObject *__pyx_temp[7] = {__pyx_t_19, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17, __pyx_t_18};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_20, 6+__pyx_t_20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
- } else
- #endif
- {
- __pyx_t_21 = PyTuple_New(6+__pyx_t_20); if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_21);
- if (__pyx_t_19) {
- __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_21, 0, __pyx_t_19); __pyx_t_19 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_21, 0+__pyx_t_20, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_21, 1+__pyx_t_20, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_21, 2+__pyx_t_20, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_16);
- PyTuple_SET_ITEM(__pyx_t_21, 3+__pyx_t_20, __pyx_t_16);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_21, 4+__pyx_t_20, __pyx_t_17);
- __Pyx_GIVEREF(__pyx_t_18);
- PyTuple_SET_ITEM(__pyx_t_21, 5+__pyx_t_20, __pyx_t_18);
- __pyx_t_13 = 0;
- __pyx_t_14 = 0;
- __pyx_t_15 = 0;
- __pyx_t_16 = 0;
- __pyx_t_17 = 0;
- __pyx_t_18 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- }
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "silx/math/combo.pyx":119
+ /* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -6092,6 +5552,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
__Pyx_XDECREF(__pyx_t_14);
@@ -6099,8 +5560,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
__Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_19);
- __Pyx_XDECREF(__pyx_t_21);
+ __Pyx_XDECREF(__pyx_t_20);
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -6110,27 +5570,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo_8_min_max(CYTHON_UNUSED PyObject *_
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_66__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_72__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults15, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -6154,13 +5617,16 @@ static PyMethodDef __pyx_fuse_2__pyx_mdef_4silx_4math_5combo_11_min_max = {"__py
static PyObject *__pyx_fuse_2__pyx_pw_4silx_4math_5combo_11_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults14 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults14, __pyx_self);
+ __pyx_defaults15 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults15, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -6182,7 +5648,7 @@ static PyObject *__pyx_fuse_2__pyx_pw_4silx_4math_5combo_11_min_max(PyObject *__
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -6192,16 +5658,16 @@ static PyObject *__pyx_fuse_2__pyx_pw_4silx_4math_5combo_11_min_max(PyObject *__
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_signed__char(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_long_double(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -6215,27 +5681,27 @@ static PyObject *__pyx_fuse_2__pyx_pw_4silx_4math_5combo_11_min_max(PyObject *__
}
static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
- signed char __pyx_v_value;
- signed char __pyx_v_minimum;
- signed char __pyx_v_maximum;
+ long double __pyx_v_value;
+ long double __pyx_v_minimum;
+ long double __pyx_v_min_pos;
+ long double __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- long __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ unsigned int __pyx_t_10;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
@@ -6244,12 +5710,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
PyObject *__pyx_t_18 = NULL;
- int __pyx_t_19;
+ Py_ssize_t __pyx_t_19;
PyObject *__pyx_t_20 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_2_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -6257,7 +5726,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -6266,7 +5735,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -6275,7 +5744,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -6284,20 +5753,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_signed__char, (int (*)(char *, PyObject *)) __pyx_memview_set_signed__char, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_long_double, (int (*)(char *, PyObject *)) __pyx_memview_set_long_double, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -6307,29 +5776,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -6343,17 +5804,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -6362,7 +5823,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -6371,25 +5832,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* else:
*/
- __pyx_t_5 = (__pyx_v_min_positive != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_4) {
} else {
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_3 = __pyx_t_4;
goto __pyx_L8_bool_binop_done;
}
- __pyx_t_5 = ((__pyx_v_value > 0) != 0);
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_4 = ((__pyx_v_value > 0.0) != 0);
+ __pyx_t_3 = __pyx_t_4;
__pyx_L8_bool_binop_done:;
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":143
+ /* "silx/math/combo.pyx":152
* maximum = value
* if min_positive and value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -6397,30 +5858,101 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* min_pos = 0
*/
__pyx_v_min_pos = __pyx_v_value;
-
- /* "silx/math/combo.pyx":142
- * minimum = value
- * maximum = value
- * if min_positive and value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * else:
- */
goto __pyx_L7;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":145
+ /* "silx/math/combo.pyx":154
* min_pos = value
* else:
* min_pos = 0 # <<<<<<<<<<<<<<
*
- * if _number in cython.floating:
+ * if _number in _floating:
*/
- /*else*/ {
- __pyx_v_min_pos = 0;
+ __pyx_v_min_pos = 0.0;
}
__pyx_L7:;
/* "silx/math/combo.pyx":158
+ * if _number in _floating:
+ * # For floating, loop until first not NaN value
+ * for index in range(length): # <<<<<<<<<<<<<<
+ * value = data[index]
+ * if not isnan(value):
+ */
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
+
+ /* "silx/math/combo.pyx":159
+ * # For floating, loop until first not NaN value
+ * for index in range(length):
+ * value = data[index] # <<<<<<<<<<<<<<
+ * if not isnan(value):
+ * minimum = value
+ */
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_data.data) + __pyx_t_7)) )));
+
+ /* "silx/math/combo.pyx":160
+ * for index in range(length):
+ * value = data[index]
+ * if not isnan(value): # <<<<<<<<<<<<<<
+ * minimum = value
+ * min_index = index
+ */
+ __pyx_t_3 = ((!(isnan(__pyx_v_value) != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "silx/math/combo.pyx":161
+ * value = data[index]
+ * if not isnan(value):
+ * minimum = value # <<<<<<<<<<<<<<
+ * min_index = index
+ * maximum = value
+ */
+ __pyx_v_minimum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":162
+ * if not isnan(value):
+ * minimum = value
+ * min_index = index # <<<<<<<<<<<<<<
+ * maximum = value
+ * max_index = index
+ */
+ __pyx_v_min_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":163
+ * minimum = value
+ * min_index = index
+ * maximum = value # <<<<<<<<<<<<<<
+ * max_index = index
+ * break
+ */
+ __pyx_v_maximum = __pyx_v_value;
+
+ /* "silx/math/combo.pyx":164
+ * min_index = index
+ * maximum = value
+ * max_index = index # <<<<<<<<<<<<<<
+ * break
+ *
+ */
+ __pyx_v_max_index = __pyx_v_index;
+
+ /* "silx/math/combo.pyx":165
+ * maximum = value
+ * max_index = index
+ * break # <<<<<<<<<<<<<<
+ *
+ * if not min_positive:
+ */
+ goto __pyx_L11_break;
+ }
+ }
+ __pyx_L11_break:;
+
+ /* "silx/math/combo.pyx":167
* break
*
* if not min_positive: # <<<<<<<<<<<<<<
@@ -6430,18 +5962,18 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":159
+ /* "silx/math/combo.pyx":168
*
* if not min_positive:
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":160
+ /* "silx/math/combo.pyx":169
* if not min_positive:
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
@@ -6449,9 +5981,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* maximum = value
*/
__pyx_t_8 = __pyx_v_index;
- __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_8)) )));
+ __pyx_v_value = (*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_data.data) + __pyx_t_8)) )));
- /* "silx/math/combo.pyx":161
+ /* "silx/math/combo.pyx":170
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -6461,7 +5993,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":162
+ /* "silx/math/combo.pyx":171
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -6470,7 +6002,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":163
+ /* "silx/math/combo.pyx":172
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -6478,18 +6010,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":161
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
- goto __pyx_L13;
+ goto __pyx_L16;
}
- /* "silx/math/combo.pyx":164
+ /* "silx/math/combo.pyx":173
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -6499,7 +6023,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":165
+ /* "silx/math/combo.pyx":174
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -6508,7 +6032,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":166
+ /* "silx/math/combo.pyx":175
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -6516,41 +6040,26 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* else:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":164
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L16;
}
- __pyx_L13:;
+ __pyx_L16:;
}
-
- /* "silx/math/combo.pyx":158
- * break
- *
- * if not min_positive: # <<<<<<<<<<<<<<
- * for index in range(index, length):
- * value = data[index]
- */
- goto __pyx_L10;
+ goto __pyx_L13;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":170
+ /* "silx/math/combo.pyx":179
* else:
* # Loop until min_pos is defined
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- /*else*/ {
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":171
+ /* "silx/math/combo.pyx":180
* # Loop until min_pos is defined
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
@@ -6558,9 +6067,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* maximum = value
*/
__pyx_t_9 = __pyx_v_index;
- __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_9)) )));
+ __pyx_v_value = (*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_data.data) + __pyx_t_9)) )));
- /* "silx/math/combo.pyx":172
+ /* "silx/math/combo.pyx":181
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -6570,7 +6079,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":173
+ /* "silx/math/combo.pyx":182
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -6579,7 +6088,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":174
+ /* "silx/math/combo.pyx":183
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -6587,18 +6096,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":172
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
- goto __pyx_L16;
+ goto __pyx_L19;
}
- /* "silx/math/combo.pyx":175
+ /* "silx/math/combo.pyx":184
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -6608,7 +6109,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":176
+ /* "silx/math/combo.pyx":185
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -6617,7 +6118,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":177
+ /* "silx/math/combo.pyx":186
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -6625,28 +6126,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* if value > 0:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":175
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L19;
}
- __pyx_L16:;
+ __pyx_L19:;
- /* "silx/math/combo.pyx":179
+ /* "silx/math/combo.pyx":188
* min_index = index
*
* if value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* min_pos_index = index
*/
- __pyx_t_3 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = ((__pyx_v_value > 0.0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":180
+ /* "silx/math/combo.pyx":189
*
* if value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -6655,7 +6149,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":181
+ /* "silx/math/combo.pyx":190
* if value > 0:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -6664,49 +6158,41 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = __pyx_v_index;
- /* "silx/math/combo.pyx":182
+ /* "silx/math/combo.pyx":191
* min_pos = value
* min_pos_index = index
* break # <<<<<<<<<<<<<<
*
* # Loop until the end
*/
- goto __pyx_L15_break;
-
- /* "silx/math/combo.pyx":179
- * min_index = index
- *
- * if value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L18_break;
}
}
- __pyx_L15_break:;
+ __pyx_L18_break:;
- /* "silx/math/combo.pyx":185
+ /* "silx/math/combo.pyx":194
*
* # Loop until the end
- * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * for index in range(index + 1, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = (__pyx_v_index + 1); __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":186
+ /* "silx/math/combo.pyx":195
* # Loop until the end
- * for index in range(index+1, length):
+ * for index in range(index + 1, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
__pyx_t_10 = __pyx_v_index;
- __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_10)) )));
+ __pyx_v_value = (*((long double *) ( /* dim=0 */ ((char *) (((long double *) __pyx_v_data.data) + __pyx_t_10)) )));
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
+ /* "silx/math/combo.pyx":196
+ * for index in range(index + 1, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
* maximum = value
@@ -6715,7 +6201,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":188
+ /* "silx/math/combo.pyx":197
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -6724,7 +6210,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":189
+ /* "silx/math/combo.pyx":198
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -6732,29 +6218,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* if value < minimum:
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
- goto __pyx_L20;
+ goto __pyx_L23;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":191
+ /* "silx/math/combo.pyx":200
* max_index = index
* else:
* if value < minimum: # <<<<<<<<<<<<<<
* minimum = value
* min_index = index
*/
- /*else*/ {
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":192
+ /* "silx/math/combo.pyx":201
* else:
* if value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -6763,7 +6241,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":193
+ /* "silx/math/combo.pyx":202
* if value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -6771,31 +6249,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* if 0 < value < min_pos:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":191
- * max_index = index
- * else:
- * if value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L24;
}
+ __pyx_L24:;
- /* "silx/math/combo.pyx":195
+ /* "silx/math/combo.pyx":204
* min_index = index
*
* if 0 < value < min_pos: # <<<<<<<<<<<<<<
* min_pos = value
* min_pos_index = index
*/
- __pyx_t_3 = (0 < __pyx_v_value);
+ __pyx_t_3 = (0.0 < __pyx_v_value);
if (__pyx_t_3) {
__pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
}
- __pyx_t_5 = (__pyx_t_3 != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
- /* "silx/math/combo.pyx":196
+ /* "silx/math/combo.pyx":205
*
* if 0 < value < min_pos:
* min_pos = value # <<<<<<<<<<<<<<
@@ -6804,7 +6276,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":197
+ /* "silx/math/combo.pyx":206
* if 0 < value < min_pos:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -6812,23 +6284,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* return _MinMaxResult(minimum,
*/
__pyx_v_min_pos_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":195
- * min_index = index
- *
- * if 0 < value < min_pos: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L25;
}
+ __pyx_L25:;
}
- __pyx_L20:;
+ __pyx_L23:;
}
}
- __pyx_L10:;
+ __pyx_L13:;
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -6846,7 +6312,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
}
}
- /* "silx/math/combo.pyx":199
+ /* "silx/math/combo.pyx":208
* min_pos_index = index
*
* return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
@@ -6854,20 +6320,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
* maximum,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_PyInt_From_signed__char(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_12 = PyFloat_FromDouble(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_12);
- /* "silx/math/combo.pyx":200
+ /* "silx/math/combo.pyx":209
*
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
* maximum,
* min_index,
*/
- if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
+ if (((__pyx_v_min_pos > 0.0) != 0)) {
+ __pyx_t_14 = PyFloat_FromDouble(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
__pyx_t_13 = __pyx_t_14;
__pyx_t_14 = 0;
@@ -6876,35 +6342,35 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_13 = Py_None;
}
- /* "silx/math/combo.pyx":201
+ /* "silx/math/combo.pyx":210
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None,
* maximum, # <<<<<<<<<<<<<<
* min_index,
* min_pos_index if min_pos > 0 else None,
*/
- __pyx_t_14 = __Pyx_PyInt_From_signed__char(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
+ __pyx_t_14 = PyFloat_FromDouble(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_14);
- /* "silx/math/combo.pyx":202
+ /* "silx/math/combo.pyx":211
* min_pos if min_pos > 0 else None,
* maximum,
* min_index, # <<<<<<<<<<<<<<
* min_pos_index if min_pos > 0 else None,
* max_index)
*/
- __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
+ __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_15);
- /* "silx/math/combo.pyx":203
+ /* "silx/math/combo.pyx":212
* maximum,
* min_index,
* min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
* max_index)
*
*/
- if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
+ if (((__pyx_v_min_pos > 0.0) != 0)) {
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
__pyx_t_16 = __pyx_t_17;
__pyx_t_17 = 0;
@@ -6913,18 +6379,18 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_16 = Py_None;
}
- /* "silx/math/combo.pyx":204
+ /* "silx/math/combo.pyx":213
* min_index,
* min_pos_index if min_pos > 0 else None,
* max_index) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_17);
__pyx_t_18 = NULL;
__pyx_t_19 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) {
__pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
if (likely(__pyx_t_18)) {
PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
@@ -6934,68 +6400,38 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
__pyx_t_19 = 1;
}
}
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- {
- __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_20);
- if (__pyx_t_18) {
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_12);
- PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_16);
- PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
- __pyx_t_12 = 0;
- __pyx_t_13 = 0;
- __pyx_t_14 = 0;
- __pyx_t_15 = 0;
- __pyx_t_16 = 0;
- __pyx_t_17 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- }
+ __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_20);
+ if (__pyx_t_18) {
+ PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_16);
+ PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_17);
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
__Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "silx/math/combo.pyx":119
+ /* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -7024,27 +6460,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo_10_min_max(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_68__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_74__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults15, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults16, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -7068,13 +6507,16 @@ static PyMethodDef __pyx_fuse_3__pyx_mdef_4silx_4math_5combo_13_min_max = {"__py
static PyObject *__pyx_fuse_3__pyx_pw_4silx_4math_5combo_13_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults15 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults15, __pyx_self);
+ __pyx_defaults16 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults16, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -7096,7 +6538,7 @@ static PyObject *__pyx_fuse_3__pyx_pw_4silx_4math_5combo_13_min_max(PyObject *__
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -7106,16 +6548,16 @@ static PyObject *__pyx_fuse_3__pyx_pw_4silx_4math_5combo_13_min_max(PyObject *__
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_short(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_char(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -7129,27 +6571,27 @@ static PyObject *__pyx_fuse_3__pyx_pw_4silx_4math_5combo_13_min_max(PyObject *__
}
static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
- short __pyx_v_value;
- short __pyx_v_minimum;
- short __pyx_v_maximum;
+ signed char __pyx_v_value;
+ signed char __pyx_v_minimum;
+ signed char __pyx_v_min_pos;
+ signed char __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- long __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
@@ -7157,13 +6599,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- int __pyx_t_19;
- PyObject *__pyx_t_20 = NULL;
+ Py_ssize_t __pyx_t_18;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_3_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -7171,7 +6615,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -7180,7 +6624,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -7189,7 +6633,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -7198,20 +6642,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_short, (int (*)(char *, PyObject *)) __pyx_memview_set_short, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_signed_char, (int (*)(char *, PyObject *)) __pyx_memview_set_signed_char, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -7221,29 +6665,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -7257,17 +6693,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((short *) ( /* dim=0 */ ((char *) (((short *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -7276,7 +6712,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -7285,25 +6721,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* else:
*/
- __pyx_t_5 = (__pyx_v_min_positive != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_4) {
} else {
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_3 = __pyx_t_4;
goto __pyx_L8_bool_binop_done;
}
- __pyx_t_5 = ((__pyx_v_value > 0) != 0);
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_4 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_4;
__pyx_L8_bool_binop_done:;
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":143
+ /* "silx/math/combo.pyx":152
* maximum = value
* if min_positive and value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -7311,30 +6747,22 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* min_pos = 0
*/
__pyx_v_min_pos = __pyx_v_value;
-
- /* "silx/math/combo.pyx":142
- * minimum = value
- * maximum = value
- * if min_positive and value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * else:
- */
goto __pyx_L7;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":145
+ /* "silx/math/combo.pyx":154
* min_pos = value
* else:
* min_pos = 0 # <<<<<<<<<<<<<<
*
- * if _number in cython.floating:
+ * if _number in _floating:
*/
- /*else*/ {
__pyx_v_min_pos = 0;
}
__pyx_L7:;
- /* "silx/math/combo.pyx":158
+ /* "silx/math/combo.pyx":167
* break
*
* if not min_positive: # <<<<<<<<<<<<<<
@@ -7344,28 +6772,28 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":159
+ /* "silx/math/combo.pyx":168
*
* if not min_positive:
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":160
+ /* "silx/math/combo.pyx":169
* if not min_positive:
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_8 = __pyx_v_index;
- __pyx_v_value = (*((short *) ( /* dim=0 */ ((char *) (((short *) __pyx_v_data.data) + __pyx_t_8)) )));
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_7)) )));
- /* "silx/math/combo.pyx":161
+ /* "silx/math/combo.pyx":170
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -7375,7 +6803,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":162
+ /* "silx/math/combo.pyx":171
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -7384,7 +6812,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":163
+ /* "silx/math/combo.pyx":172
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -7392,18 +6820,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":161
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L13;
}
- /* "silx/math/combo.pyx":164
+ /* "silx/math/combo.pyx":173
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -7413,7 +6833,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":165
+ /* "silx/math/combo.pyx":174
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -7422,7 +6842,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":166
+ /* "silx/math/combo.pyx":175
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -7430,51 +6850,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* else:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":164
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L13;
}
__pyx_L13:;
}
-
- /* "silx/math/combo.pyx":158
- * break
- *
- * if not min_positive: # <<<<<<<<<<<<<<
- * for index in range(index, length):
- * value = data[index]
- */
goto __pyx_L10;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":170
+ /* "silx/math/combo.pyx":179
* else:
* # Loop until min_pos is defined
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- /*else*/ {
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":171
+ /* "silx/math/combo.pyx":180
* # Loop until min_pos is defined
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_9 = __pyx_v_index;
- __pyx_v_value = (*((short *) ( /* dim=0 */ ((char *) (((short *) __pyx_v_data.data) + __pyx_t_9)) )));
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_8)) )));
- /* "silx/math/combo.pyx":172
+ /* "silx/math/combo.pyx":181
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -7484,7 +6889,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":173
+ /* "silx/math/combo.pyx":182
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -7493,7 +6898,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":174
+ /* "silx/math/combo.pyx":183
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -7501,18 +6906,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":172
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L16;
}
- /* "silx/math/combo.pyx":175
+ /* "silx/math/combo.pyx":184
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -7522,7 +6919,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":176
+ /* "silx/math/combo.pyx":185
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -7531,7 +6928,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":177
+ /* "silx/math/combo.pyx":186
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -7539,18 +6936,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* if value > 0:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":175
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L16;
}
__pyx_L16:;
- /* "silx/math/combo.pyx":179
+ /* "silx/math/combo.pyx":188
* min_index = index
*
* if value > 0: # <<<<<<<<<<<<<<
@@ -7560,7 +6950,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":180
+ /* "silx/math/combo.pyx":189
*
* if value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -7569,7 +6959,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":181
+ /* "silx/math/combo.pyx":190
* if value > 0:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -7578,7 +6968,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = __pyx_v_index;
- /* "silx/math/combo.pyx":182
+ /* "silx/math/combo.pyx":191
* min_pos = value
* min_pos_index = index
* break # <<<<<<<<<<<<<<
@@ -7586,41 +6976,33 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* # Loop until the end
*/
goto __pyx_L15_break;
-
- /* "silx/math/combo.pyx":179
- * min_index = index
- *
- * if value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
}
}
__pyx_L15_break:;
- /* "silx/math/combo.pyx":185
+ /* "silx/math/combo.pyx":194
*
* # Loop until the end
- * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * for index in range(index + 1, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = (__pyx_v_index + 1); __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":186
+ /* "silx/math/combo.pyx":195
* # Loop until the end
- * for index in range(index+1, length):
+ * for index in range(index + 1, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_10 = __pyx_v_index;
- __pyx_v_value = (*((short *) ( /* dim=0 */ ((char *) (((short *) __pyx_v_data.data) + __pyx_t_10)) )));
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((signed char *) ( /* dim=0 */ ((char *) (((signed char *) __pyx_v_data.data) + __pyx_t_9)) )));
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
+ /* "silx/math/combo.pyx":196
+ * for index in range(index + 1, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
* maximum = value
@@ -7629,7 +7011,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":188
+ /* "silx/math/combo.pyx":197
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -7638,7 +7020,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":189
+ /* "silx/math/combo.pyx":198
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -7646,29 +7028,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* if value < minimum:
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L20;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":191
+ /* "silx/math/combo.pyx":200
* max_index = index
* else:
* if value < minimum: # <<<<<<<<<<<<<<
* minimum = value
* min_index = index
*/
- /*else*/ {
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":192
+ /* "silx/math/combo.pyx":201
* else:
* if value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -7677,7 +7051,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":193
+ /* "silx/math/combo.pyx":202
* if value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -7685,17 +7059,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* if 0 < value < min_pos:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":191
- * max_index = index
- * else:
- * if value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L21;
}
+ __pyx_L21:;
- /* "silx/math/combo.pyx":195
+ /* "silx/math/combo.pyx":204
* min_index = index
*
* if 0 < value < min_pos: # <<<<<<<<<<<<<<
@@ -7706,10 +7074,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
if (__pyx_t_3) {
__pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
}
- __pyx_t_5 = (__pyx_t_3 != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
- /* "silx/math/combo.pyx":196
+ /* "silx/math/combo.pyx":205
*
* if 0 < value < min_pos:
* min_pos = value # <<<<<<<<<<<<<<
@@ -7718,7 +7086,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":197
+ /* "silx/math/combo.pyx":206
* if 0 < value < min_pos:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -7726,15 +7094,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* return _MinMaxResult(minimum,
*/
__pyx_v_min_pos_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":195
- * min_index = index
- *
- * if 0 < value < min_pos: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L22;
}
+ __pyx_L22:;
}
__pyx_L20:;
}
@@ -7742,7 +7104,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__pyx_L10:;
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -7760,7 +7122,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
}
}
- /* "silx/math/combo.pyx":199
+ /* "silx/math/combo.pyx":208
* min_pos_index = index
*
* return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
@@ -7768,12 +7130,12 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* maximum,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyInt_From_signed__char(__pyx_v_minimum); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_PyInt_From_short(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- /* "silx/math/combo.pyx":200
+ /* "silx/math/combo.pyx":209
*
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -7781,36 +7143,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
* min_index,
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __pyx_t_13 = __pyx_t_14;
- __pyx_t_14 = 0;
+ __pyx_t_13 = __Pyx_PyInt_From_signed__char(__pyx_v_min_pos); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_12 = __pyx_t_13;
+ __pyx_t_13 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_13 = Py_None;
+ __pyx_t_12 = Py_None;
}
- /* "silx/math/combo.pyx":201
+ /* "silx/math/combo.pyx":210
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None,
* maximum, # <<<<<<<<<<<<<<
* min_index,
* min_pos_index if min_pos > 0 else None,
*/
- __pyx_t_14 = __Pyx_PyInt_From_short(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __Pyx_PyInt_From_signed__char(__pyx_v_maximum); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
- /* "silx/math/combo.pyx":202
+ /* "silx/math/combo.pyx":211
* min_pos if min_pos > 0 else None,
* maximum,
* min_index, # <<<<<<<<<<<<<<
* min_pos_index if min_pos > 0 else None,
* max_index)
*/
- __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
- /* "silx/math/combo.pyx":203
+ /* "silx/math/combo.pyx":212
* maximum,
* min_index,
* min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -7818,98 +7180,68 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
*
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_16 = __pyx_t_17;
- __pyx_t_17 = 0;
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_15 = __pyx_t_16;
+ __pyx_t_16 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_16 = Py_None;
+ __pyx_t_15 = Py_None;
}
- /* "silx/math/combo.pyx":204
+ /* "silx/math/combo.pyx":213
* min_index,
* min_pos_index if min_pos > 0 else None,
* max_index) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = NULL;
- __pyx_t_19 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_18)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_18);
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_17 = NULL;
+ __pyx_t_18 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_17)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_11, function);
- __pyx_t_19 = 1;
- }
- }
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- {
- __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_20);
- if (__pyx_t_18) {
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_12);
- PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_16);
- PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
- __pyx_t_12 = 0;
- __pyx_t_13 = 0;
- __pyx_t_14 = 0;
- __pyx_t_15 = 0;
- __pyx_t_16 = 0;
- __pyx_t_17 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- }
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_18 = 1;
+ }
+ }
+ __pyx_t_19 = PyTuple_New(6+__pyx_t_18); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_19);
+ if (__pyx_t_17) {
+ PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_19, 3+__pyx_t_18, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_19, 4+__pyx_t_18, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_19, 5+__pyx_t_18, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_16);
+ __pyx_t_11 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "silx/math/combo.pyx":119
+ /* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -7920,6 +7252,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
@@ -7927,8 +7260,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
__Pyx_XDECREF(__pyx_t_15);
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
- __Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_XDECREF(__pyx_t_19);
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -7938,27 +7270,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo_12_min_max(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_70__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_76__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults16, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults17, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -7982,13 +7317,16 @@ static PyMethodDef __pyx_fuse_4__pyx_mdef_4silx_4math_5combo_15_min_max = {"__py
static PyObject *__pyx_fuse_4__pyx_pw_4silx_4math_5combo_15_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults16 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults16, __pyx_self);
+ __pyx_defaults17 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults17, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -8010,7 +7348,7 @@ static PyObject *__pyx_fuse_4__pyx_pw_4silx_4math_5combo_15_min_max(PyObject *__
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -8020,16 +7358,16 @@ static PyObject *__pyx_fuse_4__pyx_pw_4silx_4math_5combo_15_min_max(PyObject *__
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_int(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_short(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -8043,27 +7381,27 @@ static PyObject *__pyx_fuse_4__pyx_pw_4silx_4math_5combo_15_min_max(PyObject *__
}
static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
- int __pyx_v_value;
- int __pyx_v_minimum;
- int __pyx_v_maximum;
+ signed short __pyx_v_value;
+ signed short __pyx_v_minimum;
+ signed short __pyx_v_min_pos;
+ signed short __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- long __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
@@ -8071,13 +7409,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- int __pyx_t_19;
- PyObject *__pyx_t_20 = NULL;
+ Py_ssize_t __pyx_t_18;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_4_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -8085,7 +7425,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -8094,7 +7434,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -8103,7 +7443,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -8112,20 +7452,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_signed_short, (int (*)(char *, PyObject *)) __pyx_memview_set_signed_short, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -8135,29 +7475,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -8171,17 +7503,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((signed short *) ( /* dim=0 */ ((char *) (((signed short *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -8190,7 +7522,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -8199,25 +7531,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* else:
*/
- __pyx_t_5 = (__pyx_v_min_positive != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_4) {
} else {
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_3 = __pyx_t_4;
goto __pyx_L8_bool_binop_done;
}
- __pyx_t_5 = ((__pyx_v_value > 0) != 0);
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_4 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_4;
__pyx_L8_bool_binop_done:;
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":143
+ /* "silx/math/combo.pyx":152
* maximum = value
* if min_positive and value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -8225,30 +7557,22 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* min_pos = 0
*/
__pyx_v_min_pos = __pyx_v_value;
-
- /* "silx/math/combo.pyx":142
- * minimum = value
- * maximum = value
- * if min_positive and value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * else:
- */
goto __pyx_L7;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":145
+ /* "silx/math/combo.pyx":154
* min_pos = value
* else:
* min_pos = 0 # <<<<<<<<<<<<<<
*
- * if _number in cython.floating:
+ * if _number in _floating:
*/
- /*else*/ {
__pyx_v_min_pos = 0;
}
__pyx_L7:;
- /* "silx/math/combo.pyx":158
+ /* "silx/math/combo.pyx":167
* break
*
* if not min_positive: # <<<<<<<<<<<<<<
@@ -8258,28 +7582,28 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":159
+ /* "silx/math/combo.pyx":168
*
* if not min_positive:
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":160
+ /* "silx/math/combo.pyx":169
* if not min_positive:
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_8 = __pyx_v_index;
- __pyx_v_value = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_data.data) + __pyx_t_8)) )));
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((signed short *) ( /* dim=0 */ ((char *) (((signed short *) __pyx_v_data.data) + __pyx_t_7)) )));
- /* "silx/math/combo.pyx":161
+ /* "silx/math/combo.pyx":170
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -8289,7 +7613,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":162
+ /* "silx/math/combo.pyx":171
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -8298,7 +7622,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":163
+ /* "silx/math/combo.pyx":172
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -8306,18 +7630,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":161
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L13;
}
- /* "silx/math/combo.pyx":164
+ /* "silx/math/combo.pyx":173
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -8327,7 +7643,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":165
+ /* "silx/math/combo.pyx":174
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -8336,7 +7652,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":166
+ /* "silx/math/combo.pyx":175
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -8344,51 +7660,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* else:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":164
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L13;
}
__pyx_L13:;
}
-
- /* "silx/math/combo.pyx":158
- * break
- *
- * if not min_positive: # <<<<<<<<<<<<<<
- * for index in range(index, length):
- * value = data[index]
- */
goto __pyx_L10;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":170
+ /* "silx/math/combo.pyx":179
* else:
* # Loop until min_pos is defined
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- /*else*/ {
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":171
+ /* "silx/math/combo.pyx":180
* # Loop until min_pos is defined
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_9 = __pyx_v_index;
- __pyx_v_value = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_data.data) + __pyx_t_9)) )));
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((signed short *) ( /* dim=0 */ ((char *) (((signed short *) __pyx_v_data.data) + __pyx_t_8)) )));
- /* "silx/math/combo.pyx":172
+ /* "silx/math/combo.pyx":181
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -8398,7 +7699,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":173
+ /* "silx/math/combo.pyx":182
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -8407,7 +7708,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":174
+ /* "silx/math/combo.pyx":183
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -8415,18 +7716,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":172
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L16;
}
- /* "silx/math/combo.pyx":175
+ /* "silx/math/combo.pyx":184
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -8436,7 +7729,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":176
+ /* "silx/math/combo.pyx":185
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -8445,7 +7738,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":177
+ /* "silx/math/combo.pyx":186
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -8453,18 +7746,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* if value > 0:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":175
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L16;
}
__pyx_L16:;
- /* "silx/math/combo.pyx":179
+ /* "silx/math/combo.pyx":188
* min_index = index
*
* if value > 0: # <<<<<<<<<<<<<<
@@ -8474,7 +7760,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":180
+ /* "silx/math/combo.pyx":189
*
* if value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -8483,7 +7769,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":181
+ /* "silx/math/combo.pyx":190
* if value > 0:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -8492,7 +7778,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = __pyx_v_index;
- /* "silx/math/combo.pyx":182
+ /* "silx/math/combo.pyx":191
* min_pos = value
* min_pos_index = index
* break # <<<<<<<<<<<<<<
@@ -8500,41 +7786,33 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* # Loop until the end
*/
goto __pyx_L15_break;
-
- /* "silx/math/combo.pyx":179
- * min_index = index
- *
- * if value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
}
}
__pyx_L15_break:;
- /* "silx/math/combo.pyx":185
+ /* "silx/math/combo.pyx":194
*
* # Loop until the end
- * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * for index in range(index + 1, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = (__pyx_v_index + 1); __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":186
+ /* "silx/math/combo.pyx":195
* # Loop until the end
- * for index in range(index+1, length):
+ * for index in range(index + 1, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_10 = __pyx_v_index;
- __pyx_v_value = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_data.data) + __pyx_t_10)) )));
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((signed short *) ( /* dim=0 */ ((char *) (((signed short *) __pyx_v_data.data) + __pyx_t_9)) )));
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
+ /* "silx/math/combo.pyx":196
+ * for index in range(index + 1, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
* maximum = value
@@ -8543,7 +7821,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":188
+ /* "silx/math/combo.pyx":197
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -8552,7 +7830,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":189
+ /* "silx/math/combo.pyx":198
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -8560,29 +7838,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* if value < minimum:
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L20;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":191
+ /* "silx/math/combo.pyx":200
* max_index = index
* else:
* if value < minimum: # <<<<<<<<<<<<<<
* minimum = value
* min_index = index
*/
- /*else*/ {
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":192
+ /* "silx/math/combo.pyx":201
* else:
* if value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -8591,7 +7861,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":193
+ /* "silx/math/combo.pyx":202
* if value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -8599,17 +7869,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* if 0 < value < min_pos:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":191
- * max_index = index
- * else:
- * if value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L21;
}
+ __pyx_L21:;
- /* "silx/math/combo.pyx":195
+ /* "silx/math/combo.pyx":204
* min_index = index
*
* if 0 < value < min_pos: # <<<<<<<<<<<<<<
@@ -8620,10 +7884,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
if (__pyx_t_3) {
__pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
}
- __pyx_t_5 = (__pyx_t_3 != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
- /* "silx/math/combo.pyx":196
+ /* "silx/math/combo.pyx":205
*
* if 0 < value < min_pos:
* min_pos = value # <<<<<<<<<<<<<<
@@ -8632,7 +7896,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":197
+ /* "silx/math/combo.pyx":206
* if 0 < value < min_pos:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -8640,15 +7904,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* return _MinMaxResult(minimum,
*/
__pyx_v_min_pos_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":195
- * min_index = index
- *
- * if 0 < value < min_pos: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L22;
}
+ __pyx_L22:;
}
__pyx_L20:;
}
@@ -8656,7 +7914,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__pyx_L10:;
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -8674,7 +7932,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
}
}
- /* "silx/math/combo.pyx":199
+ /* "silx/math/combo.pyx":208
* min_pos_index = index
*
* return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
@@ -8682,12 +7940,12 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* maximum,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyInt_From_signed__short(__pyx_v_minimum); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- /* "silx/math/combo.pyx":200
+ /* "silx/math/combo.pyx":209
*
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -8695,36 +7953,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
* min_index,
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __pyx_t_13 = __pyx_t_14;
- __pyx_t_14 = 0;
+ __pyx_t_13 = __Pyx_PyInt_From_signed__short(__pyx_v_min_pos); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_12 = __pyx_t_13;
+ __pyx_t_13 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_13 = Py_None;
+ __pyx_t_12 = Py_None;
}
- /* "silx/math/combo.pyx":201
+ /* "silx/math/combo.pyx":210
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None,
* maximum, # <<<<<<<<<<<<<<
* min_index,
* min_pos_index if min_pos > 0 else None,
*/
- __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __Pyx_PyInt_From_signed__short(__pyx_v_maximum); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
- /* "silx/math/combo.pyx":202
+ /* "silx/math/combo.pyx":211
* min_pos if min_pos > 0 else None,
* maximum,
* min_index, # <<<<<<<<<<<<<<
* min_pos_index if min_pos > 0 else None,
* max_index)
*/
- __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
- /* "silx/math/combo.pyx":203
+ /* "silx/math/combo.pyx":212
* maximum,
* min_index,
* min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -8732,98 +7990,68 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
*
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_16 = __pyx_t_17;
- __pyx_t_17 = 0;
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_15 = __pyx_t_16;
+ __pyx_t_16 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_16 = Py_None;
+ __pyx_t_15 = Py_None;
}
- /* "silx/math/combo.pyx":204
+ /* "silx/math/combo.pyx":213
* min_index,
* min_pos_index if min_pos > 0 else None,
* max_index) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = NULL;
- __pyx_t_19 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_18)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_18);
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_17 = NULL;
+ __pyx_t_18 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_17)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_11, function);
- __pyx_t_19 = 1;
- }
- }
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- {
- __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_20);
- if (__pyx_t_18) {
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_12);
- PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_16);
- PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
- __pyx_t_12 = 0;
- __pyx_t_13 = 0;
- __pyx_t_14 = 0;
- __pyx_t_15 = 0;
- __pyx_t_16 = 0;
- __pyx_t_17 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- }
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_18 = 1;
+ }
+ }
+ __pyx_t_19 = PyTuple_New(6+__pyx_t_18); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_19);
+ if (__pyx_t_17) {
+ PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_19, 3+__pyx_t_18, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_19, 4+__pyx_t_18, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_19, 5+__pyx_t_18, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_16);
+ __pyx_t_11 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "silx/math/combo.pyx":119
+ /* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -8834,6 +8062,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
@@ -8841,8 +8070,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
__Pyx_XDECREF(__pyx_t_15);
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
- __Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_XDECREF(__pyx_t_19);
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -8852,27 +8080,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo_14_min_max(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_72__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_78__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults17, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults18, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -8896,13 +8127,16 @@ static PyMethodDef __pyx_fuse_5__pyx_mdef_4silx_4math_5combo_17_min_max = {"__py
static PyObject *__pyx_fuse_5__pyx_pw_4silx_4math_5combo_17_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults17 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults17, __pyx_self);
+ __pyx_defaults18 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults18, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -8924,7 +8158,7 @@ static PyObject *__pyx_fuse_5__pyx_pw_4silx_4math_5combo_17_min_max(PyObject *__
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -8934,16 +8168,16 @@ static PyObject *__pyx_fuse_5__pyx_pw_4silx_4math_5combo_17_min_max(PyObject *__
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_long(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_int(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -8957,27 +8191,27 @@ static PyObject *__pyx_fuse_5__pyx_pw_4silx_4math_5combo_17_min_max(PyObject *__
}
static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
- long __pyx_v_value;
- long __pyx_v_minimum;
- long __pyx_v_maximum;
+ signed int __pyx_v_value;
+ signed int __pyx_v_minimum;
+ signed int __pyx_v_min_pos;
+ signed int __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- long __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
@@ -8985,13 +8219,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- int __pyx_t_19;
- PyObject *__pyx_t_20 = NULL;
+ Py_ssize_t __pyx_t_18;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_5_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -8999,7 +8235,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -9008,7 +8244,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -9017,7 +8253,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -9026,20 +8262,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_signed_int, (int (*)(char *, PyObject *)) __pyx_memview_set_signed_int, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -9049,29 +8285,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -9085,17 +8313,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((signed int *) ( /* dim=0 */ ((char *) (((signed int *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -9104,7 +8332,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -9113,25 +8341,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* else:
*/
- __pyx_t_5 = (__pyx_v_min_positive != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_4) {
} else {
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_3 = __pyx_t_4;
goto __pyx_L8_bool_binop_done;
}
- __pyx_t_5 = ((__pyx_v_value > 0) != 0);
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_4 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_4;
__pyx_L8_bool_binop_done:;
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":143
+ /* "silx/math/combo.pyx":152
* maximum = value
* if min_positive and value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -9139,30 +8367,22 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* min_pos = 0
*/
__pyx_v_min_pos = __pyx_v_value;
-
- /* "silx/math/combo.pyx":142
- * minimum = value
- * maximum = value
- * if min_positive and value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * else:
- */
goto __pyx_L7;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":145
+ /* "silx/math/combo.pyx":154
* min_pos = value
* else:
* min_pos = 0 # <<<<<<<<<<<<<<
*
- * if _number in cython.floating:
+ * if _number in _floating:
*/
- /*else*/ {
__pyx_v_min_pos = 0;
}
__pyx_L7:;
- /* "silx/math/combo.pyx":158
+ /* "silx/math/combo.pyx":167
* break
*
* if not min_positive: # <<<<<<<<<<<<<<
@@ -9172,28 +8392,28 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":159
+ /* "silx/math/combo.pyx":168
*
* if not min_positive:
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":160
+ /* "silx/math/combo.pyx":169
* if not min_positive:
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_8 = __pyx_v_index;
- __pyx_v_value = (*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_data.data) + __pyx_t_8)) )));
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((signed int *) ( /* dim=0 */ ((char *) (((signed int *) __pyx_v_data.data) + __pyx_t_7)) )));
- /* "silx/math/combo.pyx":161
+ /* "silx/math/combo.pyx":170
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -9203,7 +8423,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":162
+ /* "silx/math/combo.pyx":171
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -9212,7 +8432,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":163
+ /* "silx/math/combo.pyx":172
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -9220,18 +8440,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":161
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L13;
}
- /* "silx/math/combo.pyx":164
+ /* "silx/math/combo.pyx":173
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -9241,7 +8453,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":165
+ /* "silx/math/combo.pyx":174
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -9250,7 +8462,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":166
+ /* "silx/math/combo.pyx":175
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -9258,51 +8470,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* else:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":164
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L13;
}
__pyx_L13:;
}
-
- /* "silx/math/combo.pyx":158
- * break
- *
- * if not min_positive: # <<<<<<<<<<<<<<
- * for index in range(index, length):
- * value = data[index]
- */
goto __pyx_L10;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":170
+ /* "silx/math/combo.pyx":179
* else:
* # Loop until min_pos is defined
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- /*else*/ {
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":171
+ /* "silx/math/combo.pyx":180
* # Loop until min_pos is defined
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_9 = __pyx_v_index;
- __pyx_v_value = (*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_data.data) + __pyx_t_9)) )));
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((signed int *) ( /* dim=0 */ ((char *) (((signed int *) __pyx_v_data.data) + __pyx_t_8)) )));
- /* "silx/math/combo.pyx":172
+ /* "silx/math/combo.pyx":181
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -9312,7 +8509,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":173
+ /* "silx/math/combo.pyx":182
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -9321,7 +8518,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":174
+ /* "silx/math/combo.pyx":183
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -9329,18 +8526,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":172
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L16;
}
- /* "silx/math/combo.pyx":175
+ /* "silx/math/combo.pyx":184
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -9350,7 +8539,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":176
+ /* "silx/math/combo.pyx":185
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -9359,7 +8548,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":177
+ /* "silx/math/combo.pyx":186
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -9367,18 +8556,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* if value > 0:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":175
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L16;
}
__pyx_L16:;
- /* "silx/math/combo.pyx":179
+ /* "silx/math/combo.pyx":188
* min_index = index
*
* if value > 0: # <<<<<<<<<<<<<<
@@ -9388,7 +8570,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":180
+ /* "silx/math/combo.pyx":189
*
* if value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -9397,7 +8579,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":181
+ /* "silx/math/combo.pyx":190
* if value > 0:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -9406,7 +8588,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = __pyx_v_index;
- /* "silx/math/combo.pyx":182
+ /* "silx/math/combo.pyx":191
* min_pos = value
* min_pos_index = index
* break # <<<<<<<<<<<<<<
@@ -9414,41 +8596,33 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* # Loop until the end
*/
goto __pyx_L15_break;
-
- /* "silx/math/combo.pyx":179
- * min_index = index
- *
- * if value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
}
}
__pyx_L15_break:;
- /* "silx/math/combo.pyx":185
+ /* "silx/math/combo.pyx":194
*
* # Loop until the end
- * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * for index in range(index + 1, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = (__pyx_v_index + 1); __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":186
+ /* "silx/math/combo.pyx":195
* # Loop until the end
- * for index in range(index+1, length):
+ * for index in range(index + 1, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_10 = __pyx_v_index;
- __pyx_v_value = (*((long *) ( /* dim=0 */ ((char *) (((long *) __pyx_v_data.data) + __pyx_t_10)) )));
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((signed int *) ( /* dim=0 */ ((char *) (((signed int *) __pyx_v_data.data) + __pyx_t_9)) )));
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
+ /* "silx/math/combo.pyx":196
+ * for index in range(index + 1, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
* maximum = value
@@ -9457,7 +8631,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":188
+ /* "silx/math/combo.pyx":197
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -9466,7 +8640,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":189
+ /* "silx/math/combo.pyx":198
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -9474,29 +8648,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* if value < minimum:
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L20;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":191
+ /* "silx/math/combo.pyx":200
* max_index = index
* else:
* if value < minimum: # <<<<<<<<<<<<<<
* minimum = value
* min_index = index
*/
- /*else*/ {
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":192
+ /* "silx/math/combo.pyx":201
* else:
* if value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -9505,7 +8671,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":193
+ /* "silx/math/combo.pyx":202
* if value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -9513,17 +8679,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* if 0 < value < min_pos:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":191
- * max_index = index
- * else:
- * if value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L21;
}
+ __pyx_L21:;
- /* "silx/math/combo.pyx":195
+ /* "silx/math/combo.pyx":204
* min_index = index
*
* if 0 < value < min_pos: # <<<<<<<<<<<<<<
@@ -9534,10 +8694,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
if (__pyx_t_3) {
__pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
}
- __pyx_t_5 = (__pyx_t_3 != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
- /* "silx/math/combo.pyx":196
+ /* "silx/math/combo.pyx":205
*
* if 0 < value < min_pos:
* min_pos = value # <<<<<<<<<<<<<<
@@ -9546,7 +8706,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":197
+ /* "silx/math/combo.pyx":206
* if 0 < value < min_pos:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -9554,15 +8714,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* return _MinMaxResult(minimum,
*/
__pyx_v_min_pos_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":195
- * min_index = index
- *
- * if 0 < value < min_pos: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L22;
}
+ __pyx_L22:;
}
__pyx_L20:;
}
@@ -9570,7 +8724,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__pyx_L10:;
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -9588,7 +8742,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
}
}
- /* "silx/math/combo.pyx":199
+ /* "silx/math/combo.pyx":208
* min_pos_index = index
*
* return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
@@ -9596,12 +8750,12 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* maximum,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyInt_From_signed__int(__pyx_v_minimum); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_PyInt_From_long(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- /* "silx/math/combo.pyx":200
+ /* "silx/math/combo.pyx":209
*
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -9609,36 +8763,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
* min_index,
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __pyx_t_13 = __pyx_t_14;
- __pyx_t_14 = 0;
+ __pyx_t_13 = __Pyx_PyInt_From_signed__int(__pyx_v_min_pos); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_12 = __pyx_t_13;
+ __pyx_t_13 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_13 = Py_None;
+ __pyx_t_12 = Py_None;
}
- /* "silx/math/combo.pyx":201
+ /* "silx/math/combo.pyx":210
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None,
* maximum, # <<<<<<<<<<<<<<
* min_index,
* min_pos_index if min_pos > 0 else None,
*/
- __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __Pyx_PyInt_From_signed__int(__pyx_v_maximum); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
- /* "silx/math/combo.pyx":202
+ /* "silx/math/combo.pyx":211
* min_pos if min_pos > 0 else None,
* maximum,
* min_index, # <<<<<<<<<<<<<<
* min_pos_index if min_pos > 0 else None,
* max_index)
*/
- __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
- /* "silx/math/combo.pyx":203
+ /* "silx/math/combo.pyx":212
* maximum,
* min_index,
* min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -9646,98 +8800,68 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
*
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_16 = __pyx_t_17;
- __pyx_t_17 = 0;
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_15 = __pyx_t_16;
+ __pyx_t_16 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_16 = Py_None;
+ __pyx_t_15 = Py_None;
}
- /* "silx/math/combo.pyx":204
+ /* "silx/math/combo.pyx":213
* min_index,
* min_pos_index if min_pos > 0 else None,
* max_index) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = NULL;
- __pyx_t_19 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_18)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_18);
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_17 = NULL;
+ __pyx_t_18 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_17)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_11, function);
- __pyx_t_19 = 1;
- }
- }
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- {
- __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_20);
- if (__pyx_t_18) {
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_12);
- PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_16);
- PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
- __pyx_t_12 = 0;
- __pyx_t_13 = 0;
- __pyx_t_14 = 0;
- __pyx_t_15 = 0;
- __pyx_t_16 = 0;
- __pyx_t_17 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- }
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_18 = 1;
+ }
+ }
+ __pyx_t_19 = PyTuple_New(6+__pyx_t_18); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_19);
+ if (__pyx_t_17) {
+ PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_19, 3+__pyx_t_18, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_19, 4+__pyx_t_18, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_19, 5+__pyx_t_18, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_16);
+ __pyx_t_11 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "silx/math/combo.pyx":119
+ /* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -9748,6 +8872,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
@@ -9755,8 +8880,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
__Pyx_XDECREF(__pyx_t_15);
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
- __Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_XDECREF(__pyx_t_19);
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -9766,27 +8890,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo_16_min_max(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_74__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_80__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults18, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults19, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -9810,13 +8937,16 @@ static PyMethodDef __pyx_fuse_6__pyx_mdef_4silx_4math_5combo_19_min_max = {"__py
static PyObject *__pyx_fuse_6__pyx_pw_4silx_4math_5combo_19_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults18 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults18, __pyx_self);
+ __pyx_defaults19 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults19, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -9838,7 +8968,7 @@ static PyObject *__pyx_fuse_6__pyx_pw_4silx_4math_5combo_19_min_max(PyObject *__
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -9848,16 +8978,16 @@ static PyObject *__pyx_fuse_6__pyx_pw_4silx_4math_5combo_19_min_max(PyObject *__
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_PY_LONG_LONG(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_long(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -9871,27 +9001,27 @@ static PyObject *__pyx_fuse_6__pyx_pw_4silx_4math_5combo_19_min_max(PyObject *__
}
static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
- PY_LONG_LONG __pyx_v_value;
- PY_LONG_LONG __pyx_v_minimum;
- PY_LONG_LONG __pyx_v_maximum;
+ signed long __pyx_v_value;
+ signed long __pyx_v_minimum;
+ signed long __pyx_v_min_pos;
+ signed long __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- PY_LONG_LONG __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
@@ -9899,13 +9029,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- int __pyx_t_19;
- PyObject *__pyx_t_20 = NULL;
+ Py_ssize_t __pyx_t_18;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_6_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -9913,7 +9045,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -9922,7 +9054,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -9931,7 +9063,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -9940,20 +9072,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_signed_long, (int (*)(char *, PyObject *)) __pyx_memview_set_signed_long, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -9963,29 +9095,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -9999,17 +9123,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((signed long *) ( /* dim=0 */ ((char *) (((signed long *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -10018,7 +9142,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -10027,25 +9151,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* else:
*/
- __pyx_t_5 = (__pyx_v_min_positive != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_4) {
} else {
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_3 = __pyx_t_4;
goto __pyx_L8_bool_binop_done;
}
- __pyx_t_5 = ((__pyx_v_value > 0) != 0);
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_4 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_4;
__pyx_L8_bool_binop_done:;
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":143
+ /* "silx/math/combo.pyx":152
* maximum = value
* if min_positive and value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -10053,30 +9177,22 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* min_pos = 0
*/
__pyx_v_min_pos = __pyx_v_value;
-
- /* "silx/math/combo.pyx":142
- * minimum = value
- * maximum = value
- * if min_positive and value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * else:
- */
goto __pyx_L7;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":145
+ /* "silx/math/combo.pyx":154
* min_pos = value
* else:
* min_pos = 0 # <<<<<<<<<<<<<<
*
- * if _number in cython.floating:
+ * if _number in _floating:
*/
- /*else*/ {
__pyx_v_min_pos = 0;
}
__pyx_L7:;
- /* "silx/math/combo.pyx":158
+ /* "silx/math/combo.pyx":167
* break
*
* if not min_positive: # <<<<<<<<<<<<<<
@@ -10086,28 +9202,28 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":159
+ /* "silx/math/combo.pyx":168
*
* if not min_positive:
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":160
+ /* "silx/math/combo.pyx":169
* if not min_positive:
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_8 = __pyx_v_index;
- __pyx_v_value = (*((PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_8)) )));
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((signed long *) ( /* dim=0 */ ((char *) (((signed long *) __pyx_v_data.data) + __pyx_t_7)) )));
- /* "silx/math/combo.pyx":161
+ /* "silx/math/combo.pyx":170
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -10117,7 +9233,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":162
+ /* "silx/math/combo.pyx":171
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -10126,7 +9242,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":163
+ /* "silx/math/combo.pyx":172
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -10134,18 +9250,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":161
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L13;
}
- /* "silx/math/combo.pyx":164
+ /* "silx/math/combo.pyx":173
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -10155,7 +9263,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":165
+ /* "silx/math/combo.pyx":174
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -10164,7 +9272,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":166
+ /* "silx/math/combo.pyx":175
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -10172,51 +9280,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* else:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":164
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L13;
}
__pyx_L13:;
}
-
- /* "silx/math/combo.pyx":158
- * break
- *
- * if not min_positive: # <<<<<<<<<<<<<<
- * for index in range(index, length):
- * value = data[index]
- */
goto __pyx_L10;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":170
+ /* "silx/math/combo.pyx":179
* else:
* # Loop until min_pos is defined
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- /*else*/ {
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":171
+ /* "silx/math/combo.pyx":180
* # Loop until min_pos is defined
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_9 = __pyx_v_index;
- __pyx_v_value = (*((PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_9)) )));
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((signed long *) ( /* dim=0 */ ((char *) (((signed long *) __pyx_v_data.data) + __pyx_t_8)) )));
- /* "silx/math/combo.pyx":172
+ /* "silx/math/combo.pyx":181
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -10226,7 +9319,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":173
+ /* "silx/math/combo.pyx":182
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -10235,7 +9328,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":174
+ /* "silx/math/combo.pyx":183
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -10243,18 +9336,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":172
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L16;
}
- /* "silx/math/combo.pyx":175
+ /* "silx/math/combo.pyx":184
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -10264,7 +9349,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":176
+ /* "silx/math/combo.pyx":185
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -10273,7 +9358,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":177
+ /* "silx/math/combo.pyx":186
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -10281,18 +9366,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* if value > 0:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":175
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L16;
}
__pyx_L16:;
- /* "silx/math/combo.pyx":179
+ /* "silx/math/combo.pyx":188
* min_index = index
*
* if value > 0: # <<<<<<<<<<<<<<
@@ -10302,7 +9380,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":180
+ /* "silx/math/combo.pyx":189
*
* if value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -10311,7 +9389,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":181
+ /* "silx/math/combo.pyx":190
* if value > 0:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -10320,7 +9398,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = __pyx_v_index;
- /* "silx/math/combo.pyx":182
+ /* "silx/math/combo.pyx":191
* min_pos = value
* min_pos_index = index
* break # <<<<<<<<<<<<<<
@@ -10328,41 +9406,33 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* # Loop until the end
*/
goto __pyx_L15_break;
-
- /* "silx/math/combo.pyx":179
- * min_index = index
- *
- * if value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
}
}
__pyx_L15_break:;
- /* "silx/math/combo.pyx":185
+ /* "silx/math/combo.pyx":194
*
* # Loop until the end
- * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * for index in range(index + 1, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = (__pyx_v_index + 1); __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":186
+ /* "silx/math/combo.pyx":195
* # Loop until the end
- * for index in range(index+1, length):
+ * for index in range(index + 1, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_10 = __pyx_v_index;
- __pyx_v_value = (*((PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_10)) )));
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((signed long *) ( /* dim=0 */ ((char *) (((signed long *) __pyx_v_data.data) + __pyx_t_9)) )));
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
+ /* "silx/math/combo.pyx":196
+ * for index in range(index + 1, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
* maximum = value
@@ -10371,7 +9441,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":188
+ /* "silx/math/combo.pyx":197
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -10380,7 +9450,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":189
+ /* "silx/math/combo.pyx":198
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -10388,29 +9458,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* if value < minimum:
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L20;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":191
+ /* "silx/math/combo.pyx":200
* max_index = index
* else:
* if value < minimum: # <<<<<<<<<<<<<<
* minimum = value
* min_index = index
*/
- /*else*/ {
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":192
+ /* "silx/math/combo.pyx":201
* else:
* if value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -10419,7 +9481,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":193
+ /* "silx/math/combo.pyx":202
* if value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -10427,17 +9489,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* if 0 < value < min_pos:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":191
- * max_index = index
- * else:
- * if value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L21;
}
+ __pyx_L21:;
- /* "silx/math/combo.pyx":195
+ /* "silx/math/combo.pyx":204
* min_index = index
*
* if 0 < value < min_pos: # <<<<<<<<<<<<<<
@@ -10448,10 +9504,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
if (__pyx_t_3) {
__pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
}
- __pyx_t_5 = (__pyx_t_3 != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
- /* "silx/math/combo.pyx":196
+ /* "silx/math/combo.pyx":205
*
* if 0 < value < min_pos:
* min_pos = value # <<<<<<<<<<<<<<
@@ -10460,7 +9516,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":197
+ /* "silx/math/combo.pyx":206
* if 0 < value < min_pos:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -10468,15 +9524,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* return _MinMaxResult(minimum,
*/
__pyx_v_min_pos_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":195
- * min_index = index
- *
- * if 0 < value < min_pos: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L22;
}
+ __pyx_L22:;
}
__pyx_L20:;
}
@@ -10484,7 +9534,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__pyx_L10:;
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -10502,7 +9552,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
}
}
- /* "silx/math/combo.pyx":199
+ /* "silx/math/combo.pyx":208
* min_pos_index = index
*
* return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
@@ -10510,12 +9560,12 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* maximum,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyInt_From_signed__long(__pyx_v_minimum); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- /* "silx/math/combo.pyx":200
+ /* "silx/math/combo.pyx":209
*
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -10523,36 +9573,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
* min_index,
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_14 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __pyx_t_13 = __pyx_t_14;
- __pyx_t_14 = 0;
+ __pyx_t_13 = __Pyx_PyInt_From_signed__long(__pyx_v_min_pos); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_12 = __pyx_t_13;
+ __pyx_t_13 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_13 = Py_None;
+ __pyx_t_12 = Py_None;
}
- /* "silx/math/combo.pyx":201
+ /* "silx/math/combo.pyx":210
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None,
* maximum, # <<<<<<<<<<<<<<
* min_index,
* min_pos_index if min_pos > 0 else None,
*/
- __pyx_t_14 = __Pyx_PyInt_From_PY_LONG_LONG(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __Pyx_PyInt_From_signed__long(__pyx_v_maximum); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
- /* "silx/math/combo.pyx":202
+ /* "silx/math/combo.pyx":211
* min_pos if min_pos > 0 else None,
* maximum,
* min_index, # <<<<<<<<<<<<<<
* min_pos_index if min_pos > 0 else None,
* max_index)
*/
- __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
- /* "silx/math/combo.pyx":203
+ /* "silx/math/combo.pyx":212
* maximum,
* min_index,
* min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -10560,98 +9610,68 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
*
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_16 = __pyx_t_17;
- __pyx_t_17 = 0;
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_15 = __pyx_t_16;
+ __pyx_t_16 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_16 = Py_None;
+ __pyx_t_15 = Py_None;
}
- /* "silx/math/combo.pyx":204
+ /* "silx/math/combo.pyx":213
* min_index,
* min_pos_index if min_pos > 0 else None,
* max_index) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = NULL;
- __pyx_t_19 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_18)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_18);
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_17 = NULL;
+ __pyx_t_18 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_17)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_11, function);
- __pyx_t_19 = 1;
- }
- }
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- {
- __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_20);
- if (__pyx_t_18) {
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_12);
- PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_16);
- PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
- __pyx_t_12 = 0;
- __pyx_t_13 = 0;
- __pyx_t_14 = 0;
- __pyx_t_15 = 0;
- __pyx_t_16 = 0;
- __pyx_t_17 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- }
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_18 = 1;
+ }
+ }
+ __pyx_t_19 = PyTuple_New(6+__pyx_t_18); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_19);
+ if (__pyx_t_17) {
+ PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_19, 3+__pyx_t_18, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_19, 4+__pyx_t_18, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_19, 5+__pyx_t_18, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_16);
+ __pyx_t_11 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "silx/math/combo.pyx":119
+ /* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -10662,6 +9682,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
@@ -10669,8 +9690,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
__Pyx_XDECREF(__pyx_t_15);
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
- __Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_XDECREF(__pyx_t_19);
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -10680,27 +9700,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo_18_min_max(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_76__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_82__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults19, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults20, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -10724,13 +9747,16 @@ static PyMethodDef __pyx_fuse_7__pyx_mdef_4silx_4math_5combo_21_min_max = {"__py
static PyObject *__pyx_fuse_7__pyx_pw_4silx_4math_5combo_21_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults19 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults19, __pyx_self);
+ __pyx_defaults20 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults20, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -10752,7 +9778,7 @@ static PyObject *__pyx_fuse_7__pyx_pw_4silx_4math_5combo_21_min_max(PyObject *__
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -10762,16 +9788,16 @@ static PyObject *__pyx_fuse_7__pyx_pw_4silx_4math_5combo_21_min_max(PyObject *__
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_signed_PY_LONG_LONG(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -10785,27 +9811,27 @@ static PyObject *__pyx_fuse_7__pyx_pw_4silx_4math_5combo_21_min_max(PyObject *__
}
static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
- unsigned char __pyx_v_value;
- unsigned char __pyx_v_minimum;
- unsigned char __pyx_v_maximum;
+ signed PY_LONG_LONG __pyx_v_value;
+ signed PY_LONG_LONG __pyx_v_minimum;
+ signed PY_LONG_LONG __pyx_v_min_pos;
+ signed PY_LONG_LONG __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- long __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
@@ -10813,13 +9839,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- int __pyx_t_19;
- PyObject *__pyx_t_20 = NULL;
+ Py_ssize_t __pyx_t_18;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_7_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -10827,7 +9855,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -10836,7 +9864,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -10845,7 +9873,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -10854,20 +9882,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_unsigned_char, (int (*)(char *, PyObject *)) __pyx_memview_set_unsigned_char, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_signed_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_signed_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -10877,29 +9905,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -10913,17 +9933,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((signed PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((signed PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -10932,7 +9952,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -10941,25 +9961,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: # <<<<<<<<<<<<<<
* min_pos = value
* else:
*/
- __pyx_t_5 = (__pyx_v_min_positive != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_v_min_positive != 0);
+ if (__pyx_t_4) {
} else {
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_3 = __pyx_t_4;
goto __pyx_L8_bool_binop_done;
}
- __pyx_t_5 = ((__pyx_v_value > 0) != 0);
- __pyx_t_3 = __pyx_t_5;
+ __pyx_t_4 = ((__pyx_v_value > 0) != 0);
+ __pyx_t_3 = __pyx_t_4;
__pyx_L8_bool_binop_done:;
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":143
+ /* "silx/math/combo.pyx":152
* maximum = value
* if min_positive and value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -10967,30 +9987,22 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* min_pos = 0
*/
__pyx_v_min_pos = __pyx_v_value;
-
- /* "silx/math/combo.pyx":142
- * minimum = value
- * maximum = value
- * if min_positive and value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * else:
- */
goto __pyx_L7;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":145
+ /* "silx/math/combo.pyx":154
* min_pos = value
* else:
* min_pos = 0 # <<<<<<<<<<<<<<
*
- * if _number in cython.floating:
+ * if _number in _floating:
*/
- /*else*/ {
__pyx_v_min_pos = 0;
}
__pyx_L7:;
- /* "silx/math/combo.pyx":158
+ /* "silx/math/combo.pyx":167
* break
*
* if not min_positive: # <<<<<<<<<<<<<<
@@ -11000,28 +10012,28 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((!(__pyx_v_min_positive != 0)) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":159
+ /* "silx/math/combo.pyx":168
*
* if not min_positive:
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":160
+ /* "silx/math/combo.pyx":169
* if not min_positive:
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_8 = __pyx_v_index;
- __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_8)) )));
+ __pyx_t_7 = __pyx_v_index;
+ __pyx_v_value = (*((signed PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((signed PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_7)) )));
- /* "silx/math/combo.pyx":161
+ /* "silx/math/combo.pyx":170
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -11031,7 +10043,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":162
+ /* "silx/math/combo.pyx":171
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -11040,7 +10052,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":163
+ /* "silx/math/combo.pyx":172
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -11048,18 +10060,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":161
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L13;
}
- /* "silx/math/combo.pyx":164
+ /* "silx/math/combo.pyx":173
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -11069,7 +10073,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":165
+ /* "silx/math/combo.pyx":174
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -11078,7 +10082,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":166
+ /* "silx/math/combo.pyx":175
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -11086,51 +10090,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* else:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":164
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L13;
}
__pyx_L13:;
}
-
- /* "silx/math/combo.pyx":158
- * break
- *
- * if not min_positive: # <<<<<<<<<<<<<<
- * for index in range(index, length):
- * value = data[index]
- */
goto __pyx_L10;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":170
+ /* "silx/math/combo.pyx":179
* else:
* # Loop until min_pos is defined
* for index in range(index, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- /*else*/ {
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = __pyx_v_index; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = __pyx_v_index; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":171
+ /* "silx/math/combo.pyx":180
* # Loop until min_pos is defined
* for index in range(index, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_9 = __pyx_v_index;
- __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_9)) )));
+ __pyx_t_8 = __pyx_v_index;
+ __pyx_v_value = (*((signed PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((signed PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_8)) )));
- /* "silx/math/combo.pyx":172
+ /* "silx/math/combo.pyx":181
* for index in range(index, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
@@ -11140,7 +10129,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":173
+ /* "silx/math/combo.pyx":182
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -11149,7 +10138,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":174
+ /* "silx/math/combo.pyx":183
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -11157,18 +10146,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* minimum = value
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":172
- * for index in range(index, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L16;
}
- /* "silx/math/combo.pyx":175
+ /* "silx/math/combo.pyx":184
* maximum = value
* max_index = index
* elif value < minimum: # <<<<<<<<<<<<<<
@@ -11178,7 +10159,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":176
+ /* "silx/math/combo.pyx":185
* max_index = index
* elif value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -11187,7 +10168,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":177
+ /* "silx/math/combo.pyx":186
* elif value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -11195,18 +10176,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* if value > 0:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":175
- * maximum = value
- * max_index = index
- * elif value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L16;
}
__pyx_L16:;
- /* "silx/math/combo.pyx":179
+ /* "silx/math/combo.pyx":188
* min_index = index
*
* if value > 0: # <<<<<<<<<<<<<<
@@ -11216,7 +10190,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":180
+ /* "silx/math/combo.pyx":189
*
* if value > 0:
* min_pos = value # <<<<<<<<<<<<<<
@@ -11225,7 +10199,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":181
+ /* "silx/math/combo.pyx":190
* if value > 0:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -11234,7 +10208,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = __pyx_v_index;
- /* "silx/math/combo.pyx":182
+ /* "silx/math/combo.pyx":191
* min_pos = value
* min_pos_index = index
* break # <<<<<<<<<<<<<<
@@ -11242,41 +10216,33 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* # Loop until the end
*/
goto __pyx_L15_break;
-
- /* "silx/math/combo.pyx":179
- * min_index = index
- *
- * if value > 0: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
}
}
__pyx_L15_break:;
- /* "silx/math/combo.pyx":185
+ /* "silx/math/combo.pyx":194
*
* # Loop until the end
- * for index in range(index+1, length): # <<<<<<<<<<<<<<
+ * for index in range(index + 1, length): # <<<<<<<<<<<<<<
* value = data[index]
* if value > maximum:
*/
- __pyx_t_6 = __pyx_v_length;
- for (__pyx_t_7 = (__pyx_v_index + 1); __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
- __pyx_v_index = __pyx_t_7;
+ __pyx_t_5 = __pyx_v_length;
+ for (__pyx_t_6 = (__pyx_v_index + 1); __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
+ __pyx_v_index = __pyx_t_6;
- /* "silx/math/combo.pyx":186
+ /* "silx/math/combo.pyx":195
* # Loop until the end
- * for index in range(index+1, length):
+ * for index in range(index + 1, length):
* value = data[index] # <<<<<<<<<<<<<<
* if value > maximum:
* maximum = value
*/
- __pyx_t_10 = __pyx_v_index;
- __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_10)) )));
+ __pyx_t_9 = __pyx_v_index;
+ __pyx_v_value = (*((signed PY_LONG_LONG *) ( /* dim=0 */ ((char *) (((signed PY_LONG_LONG *) __pyx_v_data.data) + __pyx_t_9)) )));
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
+ /* "silx/math/combo.pyx":196
+ * for index in range(index + 1, length):
* value = data[index]
* if value > maximum: # <<<<<<<<<<<<<<
* maximum = value
@@ -11285,7 +10251,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_value > __pyx_v_maximum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":188
+ /* "silx/math/combo.pyx":197
* value = data[index]
* if value > maximum:
* maximum = value # <<<<<<<<<<<<<<
@@ -11294,7 +10260,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":189
+ /* "silx/math/combo.pyx":198
* if value > maximum:
* maximum = value
* max_index = index # <<<<<<<<<<<<<<
@@ -11302,29 +10268,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* if value < minimum:
*/
__pyx_v_max_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":187
- * for index in range(index+1, length):
- * value = data[index]
- * if value > maximum: # <<<<<<<<<<<<<<
- * maximum = value
- * max_index = index
- */
goto __pyx_L20;
}
+ /*else*/ {
- /* "silx/math/combo.pyx":191
+ /* "silx/math/combo.pyx":200
* max_index = index
* else:
* if value < minimum: # <<<<<<<<<<<<<<
* minimum = value
* min_index = index
*/
- /*else*/ {
__pyx_t_3 = ((__pyx_v_value < __pyx_v_minimum) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":192
+ /* "silx/math/combo.pyx":201
* else:
* if value < minimum:
* minimum = value # <<<<<<<<<<<<<<
@@ -11333,7 +10291,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":193
+ /* "silx/math/combo.pyx":202
* if value < minimum:
* minimum = value
* min_index = index # <<<<<<<<<<<<<<
@@ -11341,17 +10299,11 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* if 0 < value < min_pos:
*/
__pyx_v_min_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":191
- * max_index = index
- * else:
- * if value < minimum: # <<<<<<<<<<<<<<
- * minimum = value
- * min_index = index
- */
+ goto __pyx_L21;
}
+ __pyx_L21:;
- /* "silx/math/combo.pyx":195
+ /* "silx/math/combo.pyx":204
* min_index = index
*
* if 0 < value < min_pos: # <<<<<<<<<<<<<<
@@ -11362,10 +10314,10 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
if (__pyx_t_3) {
__pyx_t_3 = (__pyx_v_value < __pyx_v_min_pos);
}
- __pyx_t_5 = (__pyx_t_3 != 0);
- if (__pyx_t_5) {
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
- /* "silx/math/combo.pyx":196
+ /* "silx/math/combo.pyx":205
*
* if 0 < value < min_pos:
* min_pos = value # <<<<<<<<<<<<<<
@@ -11374,7 +10326,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos = __pyx_v_value;
- /* "silx/math/combo.pyx":197
+ /* "silx/math/combo.pyx":206
* if 0 < value < min_pos:
* min_pos = value
* min_pos_index = index # <<<<<<<<<<<<<<
@@ -11382,15 +10334,9 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* return _MinMaxResult(minimum,
*/
__pyx_v_min_pos_index = __pyx_v_index;
-
- /* "silx/math/combo.pyx":195
- * min_index = index
- *
- * if 0 < value < min_pos: # <<<<<<<<<<<<<<
- * min_pos = value
- * min_pos_index = index
- */
+ goto __pyx_L22;
}
+ __pyx_L22:;
}
__pyx_L20:;
}
@@ -11398,7 +10344,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__pyx_L10:;
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -11416,7 +10362,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
}
}
- /* "silx/math/combo.pyx":199
+ /* "silx/math/combo.pyx":208
* min_pos_index = index
*
* return _MinMaxResult(minimum, # <<<<<<<<<<<<<<
@@ -11424,12 +10370,12 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* maximum,
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 199, __pyx_L1_error)
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_MinMaxResult); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyInt_From_signed__PY_LONG_LONG(__pyx_v_minimum); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_11);
- __pyx_t_12 = __Pyx_PyInt_From_unsigned_char(__pyx_v_minimum); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_12);
- /* "silx/math/combo.pyx":200
+ /* "silx/math/combo.pyx":209
*
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -11437,36 +10383,36 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
* min_index,
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_14 = __Pyx_PyInt_From_long(__pyx_v_min_pos); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 200, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
- __pyx_t_13 = __pyx_t_14;
- __pyx_t_14 = 0;
+ __pyx_t_13 = __Pyx_PyInt_From_signed__PY_LONG_LONG(__pyx_v_min_pos); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
+ __pyx_t_12 = __pyx_t_13;
+ __pyx_t_13 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_13 = Py_None;
+ __pyx_t_12 = Py_None;
}
- /* "silx/math/combo.pyx":201
+ /* "silx/math/combo.pyx":210
* return _MinMaxResult(minimum,
* min_pos if min_pos > 0 else None,
* maximum, # <<<<<<<<<<<<<<
* min_index,
* min_pos_index if min_pos > 0 else None,
*/
- __pyx_t_14 = __Pyx_PyInt_From_unsigned_char(__pyx_v_maximum); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 201, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __Pyx_PyInt_From_signed__PY_LONG_LONG(__pyx_v_maximum); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_13);
- /* "silx/math/combo.pyx":202
+ /* "silx/math/combo.pyx":211
* min_pos if min_pos > 0 else None,
* maximum,
* min_index, # <<<<<<<<<<<<<<
* min_pos_index if min_pos > 0 else None,
* max_index)
*/
- __pyx_t_15 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 202, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_14 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_index); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_14);
- /* "silx/math/combo.pyx":203
+ /* "silx/math/combo.pyx":212
* maximum,
* min_index,
* min_pos_index if min_pos > 0 else None, # <<<<<<<<<<<<<<
@@ -11474,98 +10420,68 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
*
*/
if (((__pyx_v_min_pos > 0) != 0)) {
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 203, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_16 = __pyx_t_17;
- __pyx_t_17 = 0;
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_min_pos_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_15 = __pyx_t_16;
+ __pyx_t_16 = 0;
} else {
__Pyx_INCREF(Py_None);
- __pyx_t_16 = Py_None;
+ __pyx_t_15 = Py_None;
}
- /* "silx/math/combo.pyx":204
+ /* "silx/math/combo.pyx":213
* min_index,
* min_pos_index if min_pos > 0 else None,
* max_index) # <<<<<<<<<<<<<<
*
*
*/
- __pyx_t_17 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 204, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_17);
- __pyx_t_18 = NULL;
- __pyx_t_19 = 0;
- if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
- __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_11);
- if (likely(__pyx_t_18)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
- __Pyx_INCREF(__pyx_t_18);
+ __pyx_t_16 = __Pyx_PyInt_From_unsigned_int(__pyx_v_max_index); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_16);
+ __pyx_t_17 = NULL;
+ __pyx_t_18 = 0;
+ if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_17)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_11, function);
- __pyx_t_19 = 1;
- }
- }
- #if CYTHON_FAST_PYCALL
- if (PyFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- #if CYTHON_FAST_PYCCALL
- if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
- PyObject *__pyx_temp[7] = {__pyx_t_18, __pyx_t_12, __pyx_t_13, __pyx_t_14, __pyx_t_15, __pyx_t_16, __pyx_t_17};
- __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_19, 6+__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
- __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
- __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
- __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- } else
- #endif
- {
- __pyx_t_20 = PyTuple_New(6+__pyx_t_19); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_20);
- if (__pyx_t_18) {
- __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_18); __pyx_t_18 = NULL;
- }
- __Pyx_GIVEREF(__pyx_t_12);
- PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_19, __pyx_t_12);
- __Pyx_GIVEREF(__pyx_t_13);
- PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_19, __pyx_t_13);
- __Pyx_GIVEREF(__pyx_t_14);
- PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_19, __pyx_t_14);
- __Pyx_GIVEREF(__pyx_t_15);
- PyTuple_SET_ITEM(__pyx_t_20, 3+__pyx_t_19, __pyx_t_15);
- __Pyx_GIVEREF(__pyx_t_16);
- PyTuple_SET_ITEM(__pyx_t_20, 4+__pyx_t_19, __pyx_t_16);
- __Pyx_GIVEREF(__pyx_t_17);
- PyTuple_SET_ITEM(__pyx_t_20, 5+__pyx_t_19, __pyx_t_17);
- __pyx_t_12 = 0;
- __pyx_t_13 = 0;
- __pyx_t_14 = 0;
- __pyx_t_15 = 0;
- __pyx_t_16 = 0;
- __pyx_t_17 = 0;
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_20, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error)
- __Pyx_GOTREF(__pyx_t_1);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- }
- __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_18 = 1;
+ }
+ }
+ __pyx_t_19 = PyTuple_New(6+__pyx_t_18); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_19);
+ if (__pyx_t_17) {
+ PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = NULL;
+ }
+ PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_18, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_18, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_18, __pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_19, 3+__pyx_t_18, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_19, 4+__pyx_t_18, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_19, 5+__pyx_t_18, __pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_16);
+ __pyx_t_11 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_13 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_15 = 0;
+ __pyx_t_16 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_19, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
goto __pyx_L0;
- /* "silx/math/combo.pyx":119
+ /* "silx/math/combo.pyx":128
* @cython.boundscheck(False)
* @cython.wraparound(False)
* def _min_max(_number[::1] data, bint min_positive=False): # <<<<<<<<<<<<<<
@@ -11576,6 +10492,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
/* function exit code */
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_10);
__Pyx_XDECREF(__pyx_t_11);
__Pyx_XDECREF(__pyx_t_12);
__Pyx_XDECREF(__pyx_t_13);
@@ -11583,8 +10500,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
__Pyx_XDECREF(__pyx_t_15);
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
- __Pyx_XDECREF(__pyx_t_18);
- __Pyx_XDECREF(__pyx_t_20);
+ __Pyx_XDECREF(__pyx_t_19);
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
@@ -11594,27 +10510,30 @@ static PyObject *__pyx_pf_4silx_4math_5combo_20_min_max(CYTHON_UNUSED PyObject *
return __pyx_r;
}
-static PyObject *__pyx_pf_4silx_4math_5combo_78__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
+static PyObject *__pyx_pf_4silx_4math_5combo_84__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
PyObject *__pyx_t_2 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__defaults__", 0);
__Pyx_XDECREF(__pyx_r);
- __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults20, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyBool_FromLong(__Pyx_CyFunction_Defaults(__pyx_defaults21, __pyx_self)->__pyx_arg_min_positive); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
- __Pyx_GIVEREF(__pyx_t_1);
PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
__pyx_t_1 = 0;
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __Pyx_GIVEREF(__pyx_t_2);
PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
__Pyx_INCREF(Py_None);
- __Pyx_GIVEREF(Py_None);
PyTuple_SET_ITEM(__pyx_t_1, 1, Py_None);
+ __Pyx_GIVEREF(Py_None);
__pyx_t_2 = 0;
__pyx_r = __pyx_t_1;
__pyx_t_1 = 0;
@@ -11638,13 +10557,16 @@ static PyMethodDef __pyx_fuse_8__pyx_mdef_4silx_4math_5combo_23_min_max = {"__py
static PyObject *__pyx_fuse_8__pyx_pw_4silx_4math_5combo_23_min_max(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
__Pyx_memviewslice __pyx_v_data = { 0, 0, { 0 }, { 0 }, { 0 } };
int __pyx_v_min_positive;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("_min_max (wrapper)", 0);
{
static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_min_positive_2,0};
PyObject* values[2] = {0,0};
- __pyx_defaults20 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults20, __pyx_self);
+ __pyx_defaults21 *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults21, __pyx_self);
if (unlikely(__pyx_kwds)) {
Py_ssize_t kw_args;
const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
@@ -11666,7 +10588,7 @@ static PyObject *__pyx_fuse_8__pyx_pw_4silx_4math_5combo_23_min_max(PyObject *__
}
}
if (unlikely(kw_args > 0)) {
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_min_max") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
}
} else {
switch (PyTuple_GET_SIZE(__pyx_args)) {
@@ -11676,16 +10598,16 @@ static PyObject *__pyx_fuse_8__pyx_pw_4silx_4math_5combo_23_min_max(PyObject *__
default: goto __pyx_L5_argtuple_error;
}
}
- __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_short(values[0]); if (unlikely(!__pyx_v_data.memview)) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_data = __Pyx_PyObject_to_MemoryviewSlice_dc_unsigned_char(values[0]); if (unlikely(!__pyx_v_data.memview)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
if (values[1]) {
- __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L3_error)
+ __pyx_v_min_positive = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_min_positive == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
} else {
__pyx_v_min_positive = __pyx_dynamic_args->__pyx_arg_min_positive;
}
}
goto __pyx_L4_argument_unpacking_done;
__pyx_L5_argtuple_error:;
- __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
+ __Pyx_RaiseArgtupleInvalid("_min_max", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
__pyx_L3_error:;
__Pyx_AddTraceback("silx.math.combo._min_max", __pyx_clineno, __pyx_lineno, __pyx_filename);
__Pyx_RefNannyFinishContext();
@@ -11699,27 +10621,27 @@ static PyObject *__pyx_fuse_8__pyx_pw_4silx_4math_5combo_23_min_max(PyObject *__
}
static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_data, int __pyx_v_min_positive) {
- unsigned short __pyx_v_value;
- unsigned short __pyx_v_minimum;
- unsigned short __pyx_v_maximum;
+ unsigned char __pyx_v_value;
+ unsigned char __pyx_v_minimum;
+ unsigned char __pyx_v_min_pos;
+ unsigned char __pyx_v_maximum;
unsigned int __pyx_v_length;
unsigned int __pyx_v_index;
unsigned int __pyx_v_min_index;
unsigned int __pyx_v_min_pos_index;
unsigned int __pyx_v_max_index;
- long __pyx_v_min_pos;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
PyObject *__pyx_t_1 = NULL;
Py_ssize_t __pyx_t_2;
int __pyx_t_3;
- Py_ssize_t __pyx_t_4;
- int __pyx_t_5;
+ int __pyx_t_4;
+ unsigned int __pyx_t_5;
unsigned int __pyx_t_6;
unsigned int __pyx_t_7;
- size_t __pyx_t_8;
- size_t __pyx_t_9;
- size_t __pyx_t_10;
+ unsigned int __pyx_t_8;
+ unsigned int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
PyObject *__pyx_t_11 = NULL;
PyObject *__pyx_t_12 = NULL;
PyObject *__pyx_t_13 = NULL;
@@ -11727,13 +10649,15 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
- PyObject *__pyx_t_18 = NULL;
- int __pyx_t_19;
- PyObject *__pyx_t_20 = NULL;
+ Py_ssize_t __pyx_t_18;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_lineno = 0;
+ const char *__pyx_filename = NULL;
+ int __pyx_clineno = 0;
__Pyx_RefNannySetupContext("__pyx_fuse_8_min_max", 0);
- /* "silx/math/combo.pyx":127
- * _number value, minimum, minpos, maximum
+ /* "silx/math/combo.pyx":136
+ * _number value, minimum, min_pos, maximum
* unsigned int length
* unsigned int index = 0 # <<<<<<<<<<<<<<
* unsigned int min_index = 0
@@ -11741,7 +10665,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_index = 0;
- /* "silx/math/combo.pyx":128
+ /* "silx/math/combo.pyx":137
* unsigned int length
* unsigned int index = 0
* unsigned int min_index = 0 # <<<<<<<<<<<<<<
@@ -11750,7 +10674,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_index = 0;
- /* "silx/math/combo.pyx":129
+ /* "silx/math/combo.pyx":138
* unsigned int index = 0
* unsigned int min_index = 0
* unsigned int min_pos_index = 0 # <<<<<<<<<<<<<<
@@ -11759,7 +10683,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_min_pos_index = 0;
- /* "silx/math/combo.pyx":130
+ /* "silx/math/combo.pyx":139
* unsigned int min_index = 0
* unsigned int min_pos_index = 0
* unsigned int max_index = 0 # <<<<<<<<<<<<<<
@@ -11768,20 +10692,20 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_max_index = 0;
- /* "silx/math/combo.pyx":132
+ /* "silx/math/combo.pyx":141
* unsigned int max_index = 0
*
* length = len(data) # <<<<<<<<<<<<<<
*
* if length == 0:
*/
- __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_unsigned_short, (int (*)(char *, PyObject *)) __pyx_memview_set_unsigned_short, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_data, 1, (PyObject *(*)(char *)) __pyx_memview_get_unsigned_char, (int (*)(char *, PyObject *)) __pyx_memview_set_unsigned_char, 0);; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
- __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
__pyx_v_length = __pyx_t_2;
- /* "silx/math/combo.pyx":134
+ /* "silx/math/combo.pyx":143
* length = len(data)
*
* if length == 0: # <<<<<<<<<<<<<<
@@ -11791,29 +10715,21 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
__pyx_t_3 = ((__pyx_v_length == 0) != 0);
if (__pyx_t_3) {
- /* "silx/math/combo.pyx":135
+ /* "silx/math/combo.pyx":144
*
* if length == 0:
* raise ValueError('Zero-size array') # <<<<<<<<<<<<<<
*
* with nogil:
*/
- __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_1);
__Pyx_Raise(__pyx_t_1, 0, 0, 0);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
- __PYX_ERR(0, 135, __pyx_L1_error)
-
- /* "silx/math/combo.pyx":134
- * length = len(data)
- *
- * if length == 0: # <<<<<<<<<<<<<<
- * raise ValueError('Zero-size array')
- *
- */
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- /* "silx/math/combo.pyx":137
+ /* "silx/math/combo.pyx":146
* raise ValueError('Zero-size array')
*
* with nogil: # <<<<<<<<<<<<<<
@@ -11827,17 +10743,17 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
#endif
/*try:*/ {
- /* "silx/math/combo.pyx":139
+ /* "silx/math/combo.pyx":148
* with nogil:
* # Init starting values
* value = data[0] # <<<<<<<<<<<<<<
* minimum = value
* maximum = value
*/
- __pyx_t_4 = 0;
- __pyx_v_value = (*((unsigned short *) ( /* dim=0 */ ((char *) (((unsigned short *) __pyx_v_data.data) + __pyx_t_4)) )));
+ __pyx_t_2 = 0;
+ __pyx_v_value = (*((unsigned char *) ( /* dim=0 */ ((char *) (((unsigned char *) __pyx_v_data.data) + __pyx_t_2)) )));
- /* "silx/math/combo.pyx":140
+ /* "silx/math/combo.pyx":149
* # Init starting values
* value = data[0]
* minimum = value # <<<<<<<<<<<<<<
@@ -11846,7 +10762,7 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_minimum = __pyx_v_value;
- /* "silx/math/combo.pyx":141
+ /* "silx/math/combo.pyx":150
* value = data[0]
* minimum = value
* maximum = value # <<<<<<<<<<<<<<
@@ -11855,25 +10771,25 @@ static PyObject *__pyx_pf_4silx_4math_5combo_22_min_max(CYTHON_UNUSED PyObject *
*/
__pyx_v_maximum = __pyx_v_value;
- /* "silx/math/combo.pyx":142
+ /* "silx/math/combo.pyx":151
* minimum = value
* maximum = value
* if min_positive and value > 0: