63
I Use This!
High Activity

News

Analyzed about 19 hours ago. based on code collected 1 day ago.
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 ... [More] <staticmethod object at 0x7f4d30e5e718>. When doing the same with a Cython cdef class, the decorators are somehow applied twice: the output becomes <staticmethod object at 0x7f4d30e5eb40> <staticmethod object at 0x7f4d305e52f0> [Less]
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 ... [More] if (fabs_npy_float64(b.real) >= fabs_npy_float64(b.imag)) { ^ ...: implicit declaration of function ‘hypot_npy_float64’ [-Wimplicit-function-declaration] return hypot_npy_float64(z.real, z.imag); ^ ...: implicit declaration of function ‘atan2_npy_float64’ [-Wimplicit-function-declaration] theta = atan2_npy_float64(a.imag, a.real); ^ ...: implicit declaration of function ‘log_npy_float64’ [-Wimplicit-function-declaration] lnr = log_npy_float64(r); ^ ...: implicit declaration of function ‘exp_npy_float64’ [-Wimplicit-function-declaration] z_r = exp_npy_float64(lnr * b.real - theta * b.imag); ^ ...: implicit declaration of function ‘cos_npy_float64’ [-Wimplicit-function-declaration] z.real = z_r * cos_npy_float64(z_theta); ^ ...: implicit declaration of function ‘sin_npy_float64’ [-Wimplicit-function-declaration] z.imag = z_r * sin_npy_float64(z_theta); ^ and an error when imported: ImportError: .../cybug.so: undefined symbol: fabs_npy_float64 The import error is a regression since Cython 0.24, the compiler warnings are also in the released Cython 0.24. [Less]
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