From d76f7cf48d6a2e0780d28fa0f8d94a321f52cf82 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Mon, 17 Mar 2008 03:48:57 +0000 Subject: ticket 641 Fix unary ufuncs for clongdouble. Still needs test functions. Needs verification that it fixes the segfault. --- numpy/core/src/ufuncobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/src/ufuncobject.c') diff --git a/numpy/core/src/ufuncobject.c b/numpy/core/src/ufuncobject.c index f1dad6626..4f5b29825 100644 --- a/numpy/core/src/ufuncobject.c +++ b/numpy/core/src/ufuncobject.c @@ -338,8 +338,8 @@ PyUFunc_G_G(char **args, intp *dimensions, intp *steps, void *func) x.real = ((longdouble *)ip1)[0]; x.imag = ((longdouble *)ip1)[1]; ((ClongdoubleUnaryFunc *)func)(&x, &res); - ((double *)op)[0] = res.real; - ((double *)op)[1] = res.imag; + ((longdouble *)op)[0] = res.real; + ((longdouble *)op)[1] = res.imag; } } -- cgit v1.2.1