CNumericType.__init__(self, real_type.rank + 0.5, real_type.signed)
self.binops = {}
self.from_parts = "%s_from_parts" % self.specalization_name()
+ self.default_value = "%s(0, 0)" % self.from_parts
def __eq__(self, other):
if isinstance(self, CComplexType) and isinstance(other, CComplexType):
>>> test_coerce_typedef_multiply(3, 1j)
(3j)
+
+ >>> complex_retval()
+ 1j
"""
ctypedef double mydouble
def test_coerce_typedef_multiply(mydouble x, double complex z):
return x * z
+
+cpdef double complex complex_retval():
+ return 1j