-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bunch of file which imported cython instead of "cimporting"
Caused a runtime dependency on cython
- Loading branch information
Showing
5 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
||
|
@@ -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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|