Skip to content

Commit

Permalink
Fix a bunch of file which imported cython instead of "cimporting"
Browse files Browse the repository at this point in the history
Caused a runtime dependency on cython
  • Loading branch information
kif committed Oct 26, 2018
1 parent 71729f0 commit 84c9e11
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions pyFAI/ext/_geometry.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

__author__ = "Jerome Kieffer"
__license__ = "MIT"
__date__ = "05/04/2018"
__date__ = "26/10/2018"
__copyright__ = "2011-2016, ESRF"
__contact__ = "[email protected]"


import cython
cimport cython
cimport numpy
import numpy
from cython.parallel cimport prange
Expand Down
1 change: 1 addition & 0 deletions pyFAI/ext/bilinear.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
14 changes: 7 additions & 7 deletions pyFAI/ext/inpainting.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = "[email protected]"
__license__ = "MIT"

import cython
from cython cimport floating
cimport numpy
import numpy
from libc.math cimport floor, ceil
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions pyFAI/ext/splitBBox.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Splitting is done on the pixel's bounding box similar to fit2D
"""
__author__ = "Jerome Kieffer"
__contact__ = "[email protected]"
__date__ = "07/09/2018"
__date__ = "26/10/2018"
__status__ = "stable"
__license__ = "MIT"

Expand Down Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions pyFAI/ext/splitPixel.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ Histogram (direct) implementation

__author__ = "Jerome Kieffer"
__contact__ = "[email protected]"
__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
Expand Down

0 comments on commit 84c9e11

Please sign in to comment.