Posted
almost 8 years
ago
by
jdemeyer
Consider
def debug(fun):
print(fun)
return fun
class A(object):
@staticmethod
@debug
def foo(self):
return self
In Python, this correctly prints <function foo at 0x7f4d305df410>.
In Cython, this wrongly prints
|
Posted
almost 8 years
ago
by
jdemeyer
Milestone changed
|
Posted
almost 8 years
ago
by
jdemeyer
Compiling this as C++ code works around the problem.
|
Posted
almost 8 years
ago
by
jdemeyer
The Cython module
cimport numpy as np
cdef np.float64_t x
cdef np.complex128_t y
cdef foo(self):
return x / y
gives compiler warnings
...: implicit declaration of function ‘fabs_npy_float64’ [-Wimplicit-function-declaration]
} else
|
Posted
about 8 years
ago
by
scoder
Milestone changed
|
Posted
about 8 years
ago
by
scoder
fixed
|
Posted
about 8 years
ago
by
scoder
Status, Owner, Component, Milestone changed
This was really generating dead code. Fixed here:
https://github.com/cython/cython/commit/dca035a35678c68fd804769dc6c83effa6172de1
|
Posted
about 8 years
ago
by
scoder
fixed
|
Posted
about 8 years
ago
by
scoder
Owner, Milestone changed
|
Posted
about 8 years
ago
by
nikratio
Keywords changed
|