Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG + 1] Fix signature not compatible with previous declaration #4456

Merged
merged 1 commit into from
Apr 1, 2015
Merged

[MRG + 1] Fix signature not compatible with previous declaration #4456

merged 1 commit into from
Apr 1, 2015

Conversation

cgohlke
Copy link
Contributor

@cgohlke cgohlke commented Mar 28, 2015

Fixes a compile error with Cython 0.22:

Error compiling Cython file:
------------------------------------------------------------
...
        cdef DTYPE_t sin_0 = sin(0.5 * (x1[0] - x2[0]))
        cdef DTYPE_t sin_1 = sin(0.5 * (x1[1] - x2[1]))
        return 2 * asin(sqrt(sin_0 * sin_0
                             + cos(x1[0]) * cos(x2[0]) * sin_1 * sin_1))

    cdef inline DTYPE_t _rdist_to_dist(self, DTYPE_t rdist):
        ^
------------------------------------------------------------

dist_metrics.pyx:984:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef int pdist(self, DTYPE_t[:, ::1] X, DTYPE_t[:, ::1] D) except -1

    cdef int cdist(self, DTYPE_t[:, ::1] X, DTYPE_t[:, ::1] Y,
                   DTYPE_t[:, ::1] D) except -1

    cdef DTYPE_t _rdist_to_dist(self, DTYPE_t rdist) except -1
                              ^
------------------------------------------------------------

dist_metrics.pxd:73:31: Previous declaration is here

Error compiling Cython file:
------------------------------------------------------------
...
                             + cos(x1[0]) * cos(x2[0]) * sin_1 * sin_1))

    cdef inline DTYPE_t _rdist_to_dist(self, DTYPE_t rdist):
        return 2 * asin(sqrt(rdist))

    cdef inline DTYPE_t _dist_to_rdist(self, DTYPE_t dist):
        ^
------------------------------------------------------------

dist_metrics.pyx:987:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cdef int cdist(self, DTYPE_t[:, ::1] X, DTYPE_t[:, ::1] Y,
                   DTYPE_t[:, ::1] D) except -1

    cdef DTYPE_t _rdist_to_dist(self, DTYPE_t rdist) except -1

    cdef DTYPE_t _dist_to_rdist(self, DTYPE_t dist) except -1
                              ^
------------------------------------------------------------

dist_metrics.pxd:75:31: Previous declaration is here

@landscape-bot
Copy link

Code Health
Code quality remained the same when pulling 5e50259 on cgohlke:patch-1 into 0117fb5 on scikit-learn:master.

@GaelVaroquaux
Copy link
Member

LGTM. Thanks a lot Chris!

@amueller amueller changed the title Fix signature not compatible with previous declaration [MRG + 1] Fix signature not compatible with previous declaration Mar 30, 2015
@amueller
Copy link
Member

amueller commented Apr 1, 2015

LGTM merging.

amueller added a commit that referenced this pull request Apr 1, 2015
[MRG + 1] Fix signature not compatible with previous declaration
@amueller amueller merged commit b18e7dd into scikit-learn:master Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants