diff --git a/pyFAI/ext/_geometry.pyx b/pyFAI/ext/_geometry.pyx index d41fd9fe9..03bd29f64 100644 --- a/pyFAI/ext/_geometry.pyx +++ b/pyFAI/ext/_geometry.pyx @@ -28,12 +28,12 @@ __author__ = "Jerome Kieffer" __license__ = "MIT" -__date__ = "05/04/2018" +__date__ = "26/10/2018" __copyright__ = "2011-2016, ESRF" __contact__ = "jerome.kieffer@esrf.fr" -import cython +cimport cython cimport numpy import numpy from cython.parallel cimport prange diff --git a/pyFAI/ext/bilinear.pxi b/pyFAI/ext/bilinear.pxi index 4435f389b..2b97c3183 100644 --- a/pyFAI/ext/bilinear.pxi +++ b/pyFAI/ext/bilinear.pxi @@ -25,6 +25,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +cimport cython from libc.math cimport floor, ceil import logging logger = logging.getLogger("bilinear") diff --git a/pyFAI/ext/inpainting.pyx b/pyFAI/ext/inpainting.pyx index aa73ce0ce..f79bb8bbf 100644 --- a/pyFAI/ext/inpainting.pyx +++ b/pyFAI/ext/inpainting.pyx @@ -29,11 +29,11 @@ Simple Cython module for doing CRC32 for checksums, possibly with SSE4 acceleration """ __author__ = "Jérôme Kieffer" -__date__ = "18/12/2017" +__date__ = "26/10/2018" __contact__ = "Jerome.kieffer@esrf.fr" __license__ = "MIT" -import cython +from cython cimport floating cimport numpy import numpy from libc.math cimport floor, ceil @@ -69,11 +69,11 @@ def largest_width(numpy.int8_t[:, :]image): def polar_interpolate(data, numpy.int8_t[:, ::1] mask, - cython.floating[:, ::1] radial, - cython.floating[:, ::1] azimuthal, + floating[:, ::1] radial, + floating[:, ::1] azimuthal, polar, - cython.floating[::1] rad_pos, - cython.floating[::1] azim_pos + floating[::1] rad_pos, + floating[::1] azim_pos ): """Perform the bilinear interpolation from polar data into the initial array data @@ -125,7 +125,7 @@ def polar_interpolate(data, return numpy.asarray(cdata) -def polar_inpaint(cython.floating[:, :] img not None, +def polar_inpaint(floating[:, :] img not None, numpy.int8_t[:, :] topaint not None, numpy.int8_t[:, :] mask=None, empty=None): diff --git a/pyFAI/ext/splitBBox.pyx b/pyFAI/ext/splitBBox.pyx index 9bcbd2c3e..02eda7f96 100644 --- a/pyFAI/ext/splitBBox.pyx +++ b/pyFAI/ext/splitBBox.pyx @@ -31,7 +31,7 @@ Splitting is done on the pixel's bounding box similar to fit2D """ __author__ = "Jerome Kieffer" __contact__ = "Jerome.kieffer@esrf.fr" -__date__ = "07/09/2018" +__date__ = "26/10/2018" __status__ = "stable" __license__ = "MIT" @@ -180,8 +180,8 @@ def histoBBox1d(numpy.ndarray weights not None, assert pos1.size == size, "pos1.size == size" assert delta_pos1.size == size, "delta_pos1.size == size" check_pos1 = 1 - cpos1 = numpy.ascontiguousarray(pos1.ravel(), dtype=numpy.float32) - dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(), dtype=numpy.float32) + cpos1 = numpy.ascontiguousarray(pos1.ravel(), dtype=position_d) + dpos1 = numpy.ascontiguousarray(delta_pos1.ravel(), dtype=position_d) pos1_min = min(pos1Range) pos1_maxin = max(pos1Range) pos1_max = calc_upper_bound(pos1_maxin) diff --git a/pyFAI/ext/splitPixel.pyx b/pyFAI/ext/splitPixel.pyx index f3e00b923..7c9c69d14 100644 --- a/pyFAI/ext/splitPixel.pyx +++ b/pyFAI/ext/splitPixel.pyx @@ -33,12 +33,12 @@ Histogram (direct) implementation __author__ = "Jerome Kieffer" __contact__ = "Jerome.kieffer@esrf.fr" -__date__ = "18/10/2018" +__date__ = "26/10/2018" __status__ = "stable" __license__ = "MIT" -import cython -from cython import floating +cimport cython +from cython cimport floating cimport numpy import numpy from libc.math cimport fabs, ceil, floor