Skip to content

Commit 1bea10a

Browse files
author
droodev
committed
fixing manual real and img values setting.
1 parent c77c70d commit 1bea10a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/npy_util.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ npy_complex128 complex_float_prod(npy_complex128 a, float b) {
4646
void complex_inc(npy_complex128 *a, npy_complex128 b) {
4747
#if defined(_MSC_VER)
4848
npy_complex128 tmp = {creal(*a) + creal(b), cimag(*a) + cimag(b)};
49-
(*a)[0] = creal(tmp);
50-
(*a)[1] = cimag(tmp);
49+
((double *)a)[0] = creal(tmp);
50+
((double *)a)[1] = cimag(tmp);
5151
return;
5252
#else /* !defined(_MSC_VER) */
5353
*a *= b;
@@ -59,8 +59,8 @@ void complex_inc(npy_complex128 *a, npy_complex128 b) {
5959
void complex_multiply(npy_complex128 *a, npy_complex128 b) {
6060
#if defined(_MSC_VER)
6161
npy_complex128 tmp = _Cmulcc(*a, b);
62-
(*a)[0] = creal(tmp);
63-
(*a)[1] = cimag(tmp);
62+
((double *)a)[0] = creal(tmp);
63+
((double *)a)[1] = cimag(tmp);
6464
return ;
6565
#else /* !defined(_MSC_VER) */
6666
*a *= b;

0 commit comments

Comments
 (0)