Skip to content

Commit

Permalink
Merge pull request #870 from stefanv/bugs/windows-round
Browse files Browse the repository at this point in the history
Replace Cython's round with a VC2010 compatible version
  • Loading branch information
ahojnnes committed Jan 29, 2014
2 parents e1d2dcd + 5d9115a commit 305ef0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion skimage/feature/orb_cy.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import numpy as np
from skimage import data_dir

cimport numpy as cnp
from libc.math cimport sin, cos, round
from libc.math cimport sin, cos

from skimage._shared.interpolation cimport round

POS = np.loadtxt(os.path.join(data_dir, "orb_descriptor_positions.txt"),
dtype=np.int8)
Expand Down
4 changes: 1 addition & 3 deletions skimage/transform/_hough_transform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ from skimage.draw import circle_perimeter
cdef double PI_2 = 1.5707963267948966
cdef double NEG_PI_2 = -PI_2


cdef inline Py_ssize_t round(double r):
return <Py_ssize_t>((r + 0.5) if (r > 0.0) else (r - 0.5))
from skimage._shared.interpolation cimport round


def _hough_circle(cnp.ndarray img,
Expand Down

0 comments on commit 305ef0d

Please sign in to comment.